remove block tinting
This commit is contained in:
parent
189d6883b9
commit
0525ba5d56
241 changed files with 1162 additions and 1650 deletions
|
@ -5,91 +5,88 @@ import java.util.Map;
|
|||
|
||||
import common.collect.Lists;
|
||||
import common.collect.Maps;
|
||||
import common.color.Colorizer;
|
||||
import common.log.Log;
|
||||
import common.rng.PerlinGen;
|
||||
import common.rng.Random;
|
||||
import common.util.BlockPos;
|
||||
import common.util.Displayable;
|
||||
import common.util.ExtMath;
|
||||
import common.util.Identifyable;
|
||||
|
||||
public enum Biome implements Identifyable, Displayable {
|
||||
NONE(0, "none", "<Keins>", 0x000000),
|
||||
PLAINS(1, "plains", "Ebene", 0x8db360, 12.0f, 40.0f),
|
||||
DESERT(2, "desert", "Wüste", 0xfa9418, 60.0f, 0.0f),
|
||||
EXTREMEHILLS(3, "extremeHills", "Extremes Bergland", 0x606060, -12.0f, 30.0f),
|
||||
FOREST(4, "forest", "Wald", 0x056621, 8.0f, 80.0f),
|
||||
TAIGA(5, "taiga", "Taiga", 0x0b6659, -10.0f, 80.0f),
|
||||
SWAMPLAND(6, "swampland", "Sumpf", 0x07f9b2, 12.0f, 90.0f, 0xe0ffae, 0xffffffff, 6975545),
|
||||
RIVER(7, "river", "Fluss", 0x0000ff),
|
||||
EXTERMINATED(8, "exterminated", "Ausgelöscht", 0x000000, 150.0f, 0.0f, 0x202020, 0x303030, 0x303030),
|
||||
SPACE(9, "space", "Leere des Weltraums", 0x000000, 0.0f, 0.0f),
|
||||
FROZENSEA(10, "frozenSea", "Vereister See", 0x9090a0, -20.0f),
|
||||
FROZENRIVER(11, "frozenRiver", "Vereister Fluss", 0xa0a0ff, -20.0f),
|
||||
ICEPLAINS(12, "icePlains", "Eisebene", 0xffffff, -20.0f),
|
||||
ICEMOUNTAINS(13, "iceMountains", "Vereistes Bergland", 0xa0a0a0, -20.0f),
|
||||
MUSHROOMPLAINS(14, "mushroomPlains", "Pilzland", 0xff00ff, 16.0f, 100.0f),
|
||||
BLACKENED(15, "blackened", "Schwarz", 0x000000, 0.0f, 0.0f, 0x000000, 0x303030, 0x303030),
|
||||
BEACH(16, "beach", "Strand", 0xfade55, 12.0f, 40.0f),
|
||||
DESERTHILLS(17, "desertHills", "Wüsten-Bergland", 0xd25f12, 60.0f, 0.0f),
|
||||
FORESTHILLS(18, "forestHills", "Wald-Bergland", 0x22551c, 8.0f, 80.0f),
|
||||
TAIGAHILLS(19, "taigaHills", "Taiga-Bergland", 0x163933, -10.0f, 80.0f),
|
||||
EXTREMEHILLSEDGE(20, "extremeHillsEdge", "Extremes Bergland Gr.", 0x72789a, -12.0f, 30.0f),
|
||||
JUNGLE(21, "jungle", "Urwald", 0x537b09, 18.0f, 90.0f),
|
||||
JUNGLEHILLS(22, "jungleHills", "Urwald-Bergland", 0x2c4205, 18.0f, 90.0f),
|
||||
JUNGLEEDGE(23, "jungleEdge", "Urwald Gr.", 0x628b17, 18.0f, 80.0f),
|
||||
SEA(24, "sea", "See", 0x000070),
|
||||
STONEBEACH(25, "stoneBeach", "Steinstrand", 0xa2a284, -12.0f, 30.0f),
|
||||
COLDBEACH(26, "coldBeach", "Vereister Strand", 0xfaf0c0, -18.0f, 30.0f),
|
||||
BIRCHFOREST(27, "birchForest", "Birkenwald", 0x307444, 4.0f, 60.0f),
|
||||
BIRCHFORESTHILLS(28, "birchForestHills", "Birkenwald-Bergland", 0x1f5f32, 4.0f, 60.0f),
|
||||
ROOFEDFOREST(29, "roofedForest", "Dichter Wald", 0x40511a, 8.0f, 80.0f),
|
||||
COLDTAIGA(30, "coldTaiga", "Vereiste Taiga", 0x31554a, -40.0f, 40.0f),
|
||||
COLDTAIGAHILLS(31, "coldTaigaHills", "Vereistes Taiga-Bergland", 0x243f36, -40.0f, 40.0f),
|
||||
MEGATAIGA(32, "megaTaiga", "Hohe Taiga", 0x596651, -8.0f, 80.0f),
|
||||
MEGATAIGAHILLS(33, "megaTaigaHills", "Hohes Taiga-Bergland", 0x454f3e, -8.0f, 80.0f),
|
||||
EXTREMEHILLSPLUS(34, "extremeHillsPlus", "Extremes Bergland +", 0x507050, -12.0f, 30.0f),
|
||||
SAVANNA(35, "savanna", "Savanne", 0xbdb25f, 28.0f, 0.0f),
|
||||
SAVANNAPLATEAU(36, "savannaPlateau", "Savannen-Plateau", 0xa79d64, 20.0f, 0.0f),
|
||||
MESA(37, "mesa", "Mesa", 0xd94515, 0.0f, 0.0f, 0xffffff, 9470285, 10387789),
|
||||
MESAPLATEAUF(38, "mesaPlateauF", "Mesa-Waldplateau", 0xb09765, 0.0f, 0.0f, 0xffffff, 9470285, 10387789),
|
||||
MESAPLATEAU(39, "mesaPlateau", "Mesa-Plateau", 0xca8c65, 0.0f, 0.0f, 0xffffff, 9470285, 10387789),
|
||||
SNOWLAND(40, "snowLand", "Eisland", 0xffffff, 0.0f, 100.0f),
|
||||
TIAN(41, "tian", "Tian", 0x808080, 0.0f, 80.0f),
|
||||
ELVENFOREST(42, "elvenForest", "Elbenwald", 0x059821, 8.0f, 90.0f),
|
||||
UPPERHELL(43, "upperHell", "Übergang in die Hölle", 0xff0000, 0.0f, 0.0f, 0x000000, 0x000000, 0x000000),
|
||||
LOWERHELL(44, "lowerHell", "Abgrund der Hölle", 0xff0000, 0.0f, 0.0f, 0x000000, 0x000000, 0x000000),
|
||||
HELLHILLS(45, "hellHills", "Bergland der Hölle", 0xff0000, 0.0f, 0.0f, 0x000000, 0x000000, 0x000000),
|
||||
SOULPLAINS(46, "soulPlains", "Seelenland", 0xff0000, 0.0f, 0.0f, 0x000000, 0x000000, 0x000000),
|
||||
ASHLAND(47, "ashLand", "Verbrannt", 0xff0000, 0.0f, 0.0f, 0x000000, 0x000000, 0x000000),
|
||||
MOON(48, "moon", "Mondoberfläche", 0xa0a0a0, 0.0f, 0.0f),
|
||||
CHAOS(49, "chaos", "Chaos", 0xff00ff),
|
||||
NONE("none", "<Keins>", 0x000000),
|
||||
PLAIN("plain", "Ebene", 0x8db360, 12.0f, 40.0f),
|
||||
DESERT("desert", "Wüste", 0xfa9418, 60.0f, 0.0f),
|
||||
HILLS("hills", "Bergland", 0x606060, -12.0f, 30.0f),
|
||||
FOREST("forest", "Wald", 0x056621, 8.0f, 80.0f),
|
||||
TAIGA("taiga", "Taiga", 0x0b6659, -10.0f, 80.0f),
|
||||
SWAMP("swamp", "Sumpf", 0x07f9b2, 12.0f, 90.0f),
|
||||
RIVER("river", "Fluss", 0x0000ff),
|
||||
EXTERMINATED("exterminated", "Ausgelöscht", 0x000000, 150.0f, 0.0f),
|
||||
SPACE("space", "Leere des Weltraums", 0x000000, 0.0f, 0.0f),
|
||||
ICE_SEA("ice_sea", "Vereister See", 0x9090a0, -20.0f),
|
||||
ICE_RIVER("ice_river", "Vereister Fluss", 0xa0a0ff, -20.0f),
|
||||
ICE("ice", "Eisebene", 0xffffff, -20.0f),
|
||||
ICE_HILLS("ice_hills", "Vereistes Bergland", 0xa0a0a0, -20.0f),
|
||||
MUSHROOM("mushroom", "Pilzland", 0xff00ff, 16.0f, 100.0f),
|
||||
BLACKENED("blackened", "Schwarz", 0x000000, 0.0f, 0.0f),
|
||||
BEACH("beach", "Strand", 0xfade55, 12.0f, 40.0f),
|
||||
DESERT_HILLS("desert_hills", "Wüsten-Bergland", 0xd25f12, 60.0f, 0.0f),
|
||||
FOREST_HILLS("forest_hills", "Wald-Bergland", 0x22551c, 8.0f, 80.0f),
|
||||
TAIGA_HILLS("taiga_hills", "Taiga-Bergland", 0x163933, -10.0f, 80.0f),
|
||||
HILLS_EDGE("hills_edge", "Bergland-Grenze", 0x72789a, -12.0f, 30.0f),
|
||||
TROPIC("tropic", "Urwald", 0x537b09, 18.0f, 90.0f),
|
||||
TROPIC_HILLS("tropic_hills", "Urwald-Bergland", 0x2c4205, 18.0f, 90.0f),
|
||||
TROPIC_EDGE("tropic_edge", "Urwald-Grenze", 0x628b17, 18.0f, 80.0f),
|
||||
SEA("sea", "See", 0x000070),
|
||||
STONE_BEACH("stone_beach", "Steinstrand", 0xa2a284, -12.0f, 30.0f),
|
||||
ICE_BEACH("ice_beach", "Vereister Strand", 0xfaf0c0, -18.0f, 30.0f),
|
||||
BIRCH_FOREST("birch_forest", "Birkenwald", 0x307444, 4.0f, 60.0f),
|
||||
BIRCH_HILLS("birch_hills", "Birken-Bergland", 0x1f5f32, 4.0f, 60.0f),
|
||||
DARK_FOREST("dark_forest", "Dichter Wald", 0x40511a, 8.0f, 80.0f),
|
||||
ICE_TAIGA("ice_taiga", "Vereiste Taiga", 0x31554a, -40.0f, 40.0f),
|
||||
ICE_TAIGA_HILLS("ice_taiga_hills", "Vereistes Taiga-Bergland", 0x243f36, -40.0f, 40.0f),
|
||||
LARGE_TAIGA("large_taiga", "Hohe Taiga", 0x596651, -8.0f, 80.0f),
|
||||
LARGE_TAIGA_HILLS("large_taiga_hills", "Hohes Taiga-Bergland", 0x454f3e, -8.0f, 80.0f),
|
||||
LARGE_HILLS("large_hills", "Hohes Bergland", 0x507050, -12.0f, 30.0f),
|
||||
SAVANNA("savanna", "Savanne", 0xbdb25f, 28.0f, 0.0f),
|
||||
SAVANNA_PLATEAU("savanna_plateau", "Savannen-Plateau", 0xa79d64, 20.0f, 0.0f),
|
||||
MESA("mesa", "Mesa", 0xd94515, 0.0f, 0.0f),
|
||||
MESA_FOREST("mesa_forest", "Mesa-Wald", 0xb09765, 0.0f, 0.0f),
|
||||
MESA_PLATEAU("mesa_plateau", "Mesa-Plateau", 0xca8c65, 0.0f, 0.0f),
|
||||
SNOW("snow", "Eisland", 0xffffff, 0.0f, 100.0f),
|
||||
TIAN("tian", "Tian", 0x808080, 0.0f, 80.0f),
|
||||
ELVEN_FOREST("elven_forest", "Elbenwald", 0x059821, 8.0f, 90.0f),
|
||||
UPPER_HELL("upper_hell", "Übergang in die Hölle", 0xff0000, 0.0f, 0.0f),
|
||||
LOWER_HELL("lower_hell", "Abgrund der Hölle", 0xff0000, 0.0f, 0.0f),
|
||||
HELL_HILLS("hell_hills", "Bergland der Hölle", 0xff0000, 0.0f, 0.0f),
|
||||
SOUL_PLAINS("soul_plains", "Seelenland", 0xff0000, 0.0f, 0.0f),
|
||||
ASH("ash", "Verbrannt", 0xff0000, 0.0f, 0.0f),
|
||||
MOON("moon", "Mondoberfläche", 0xa0a0a0, 0.0f, 0.0f),
|
||||
CHAOS("chaos", "Chaos", 0xff00ff),
|
||||
|
||||
DESERTM(130, "desertM", "Wüste M", 0xfa9418, 60.0f, 0.0f),
|
||||
EXTREMEHILLSM(131, "extremeHillsM", "Extremes Bergland M", 0x606060, -12.0f, 30.0f),
|
||||
FLOWERFOREST(132, "flowerForest", "Blumenwald", 0x6a7425, 8.0f, 80.0f),
|
||||
TAIGAM(133, "taigaM", "Taiga M", 0x0b6659, -10.0f, 80.0f),
|
||||
SWAMPLANDM(134, "swamplandM", "Sumpf M", 0x07f9b2, 12.0f, 90.0f, 0xe0ffae, 0xffffffff, 6975545),
|
||||
ICEPLAINSSPIKES(140, "icePlainsSpikes", "Eisebene + Spitzen", 0xd2ffff, -20.0f),
|
||||
JUNGLEM(149, "jungleM", "Urwald M", 0x537b09, 18.0f, 90.0f),
|
||||
JUNGLEEDGEM(151, "jungleEdgeM", "Urwald Gr. M", 0x628b17, 18.0f, 80.0f),
|
||||
BIRCHFORESTM(155, "birchForestM", "Birkenwald M", 0x307444, 4.0f, 60.0f),
|
||||
BIRCHFORESTHILLSM(156, "birchForestHillsM", "Birkenwald-Bergland M", 0x1f5f32, 4.0f, 60.0f),
|
||||
ROOFEDFORESTM(157, "roofedForestM", "Dichter Wald M", 0x40511a, 8.0f, 80.0f),
|
||||
COLDTAIGAM(158, "coldTaigaM", "Vereiste Taiga M", 0x31554a, -40.0f, 40.0f),
|
||||
MEGASPRUCETAIGA(160, "megaSpruceTaiga", "Hohe Fichtentaiga", 0x596651, -10.0f, 80.0f),
|
||||
REDWOODTAIGAHILLSM(161, "redwoodTaigaHillsM", "Mammutbaumtaiga", 0x596651, -10.0f, 80.0f),
|
||||
EXTREMEHILLSPLUSM(162, "extremeHillsPlusM", "Extremes Bergland + M", 0x507050, -12.0f, 30.0f),
|
||||
SAVANNAM(163, "savannaM", "Savanne M", 0xbdb25f, 24.0f, 0.0f),
|
||||
SAVANNAPLATEAUM(164, "savannaPlateauM", "Savannen-Plateau M", 0xa79d64, 20.0f, 0.0f),
|
||||
MESABRYCE(165, "mesaBryce", "Mesa (Bryce)", 0xd94515, 0.0f, 0.0f, 0xffffff, 9470285, 10387789),
|
||||
MESAPLATEAUFM(166, "mesaPlateauFM", "Mesa-Waldplateau M", 0xb09765, 0.0f, 0.0f, 0xffffff, 9470285, 10387789),
|
||||
MESAPLATEAUM(167, "mesaPlateauM", "Mesa-Plateau M", 0xca8c65, 0.0f, 0.0f, 0xffffff, 9470285, 10387789);
|
||||
DESERT_MOD("desert_mod", "Wüste M", 0xfa9418, 60.0f, 0.0f),
|
||||
HILLS_MOD("hills_mod", "Bergland M", 0x606060, -12.0f, 30.0f),
|
||||
FLOWER_FOREST("flower_forest", "Blumenwald", 0x6a7425, 8.0f, 80.0f),
|
||||
TAIGA_MOD("taiga_mod", "Taiga M", 0x0b6659, -10.0f, 80.0f),
|
||||
SWAMP_MOD("swamp_mod", "Sumpf M", 0x07f9b2, 12.0f, 90.0f),
|
||||
ICE_SPIKES("ice_spikes", "Eisebene mit Spitzen", 0xd2ffff, -20.0f),
|
||||
TROPIC_MOD("tropic_mod", "Urwald M", 0x537b09, 18.0f, 90.0f),
|
||||
TROPIC_EDGE_MOD("propic_edge_mod", "Urwald-Grenze M", 0x628b17, 18.0f, 80.0f),
|
||||
BIRCH_FOREST_MOD("birch_forest_mod", "Birkenwald M", 0x307444, 4.0f, 60.0f),
|
||||
BIRCH_HILLS_MOD("birch_hills_mod", "Birken-Bergland M", 0x1f5f32, 4.0f, 60.0f),
|
||||
DARK_FOREST_MOD("dark_forest_mod", "Dichter Wald M", 0x40511a, 8.0f, 80.0f),
|
||||
ICE_TAIGA_MOD("ice_taiga_mod", "Vereiste Taiga M", 0x31554a, -40.0f, 40.0f),
|
||||
SPRUCE_TAIGA("spruce_taiga", "Fichtentaiga", 0x596651, -10.0f, 80.0f),
|
||||
REDWOOD_TAIGA("redwood_taiga", "Mammutbaumtaiga", 0x596651, -10.0f, 80.0f),
|
||||
LARGE_HILLS_MOD("large_hills_mod", "Hohes Bergland M", 0x507050, -12.0f, 30.0f),
|
||||
SAVANNA_MOD("savanna_mod", "Savanne M", 0xbdb25f, 24.0f, 0.0f),
|
||||
SAVANNA_PLATEAU_MOD("savanna_plateau_mod", "Savannen-Plateau M", 0xa79d64, 20.0f, 0.0f),
|
||||
MESA_PEAK("mesa_peak", "Mesa-Spitze", 0xd94515, 0.0f, 0.0f),
|
||||
MESA_FOREST_MOD("mesa_forest_mod", "Mesa-Wald M", 0xb09765, 0.0f, 0.0f),
|
||||
MESA_PLATEAU_MOD("mesa_plateau_mod", "Mesa-Plateau M", 0xca8c65, 0.0f, 0.0f);
|
||||
|
||||
public static final Biome DEF_BIOME = FOREST;
|
||||
private static final PerlinGen TEMP_NOISE = new PerlinGen(new Random(836430928262265276L), 1);
|
||||
private static final PerlinGen COLOR_NOISE = new PerlinGen(new Random(6549321755809421L), 1);
|
||||
private static final Biome[] BIOMES = new Biome[256];
|
||||
private static final Map<String, Biome> LOOKUP = Maps.newTreeMap();
|
||||
|
||||
|
@ -99,16 +96,13 @@ public enum Biome implements Identifyable, Displayable {
|
|||
public final int color;
|
||||
public final float temperature;
|
||||
public final float humidity;
|
||||
public final int waterColor;
|
||||
public final int grassColor;
|
||||
public final int foliageColor;
|
||||
|
||||
static {
|
||||
for(Biome biome : values()) {
|
||||
BIOMES[biome.id] = biome;
|
||||
if(LOOKUP.containsKey(biome.name.toLowerCase()))
|
||||
throw new IllegalStateException("Biom \"" + biome.name + "\" ist als ID " + LOOKUP.get(biome.name.toLowerCase()).id + " und " + biome.id + " definiert");
|
||||
LOOKUP.put(biome.name.toLowerCase(), biome);
|
||||
if(LOOKUP.containsKey(biome.name))
|
||||
throw new IllegalStateException("Biom \"" + biome.name + "\" ist als ID " + LOOKUP.get(biome.name).id + " und " + biome.id + " definiert");
|
||||
LOOKUP.put(biome.name, biome);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -158,28 +152,21 @@ public enum Biome implements Identifyable, Displayable {
|
|||
return biome;
|
||||
}
|
||||
|
||||
private Biome(int id, String name, String display, int color, float temperature, float humidity, int waterColor, int grassColor, int foliageColor) {
|
||||
this.id = id;
|
||||
private Biome(String name, String display, int color, float temperature, float humidity) {
|
||||
this.id = this.ordinal();
|
||||
this.name = name;
|
||||
this.display = display;
|
||||
this.temperature = temperature;
|
||||
this.humidity = humidity;
|
||||
this.color = color;
|
||||
this.waterColor = waterColor;
|
||||
this.grassColor = grassColor;
|
||||
this.foliageColor = foliageColor;
|
||||
}
|
||||
|
||||
private Biome(int id, String name, String display, int color, float temperature, float humidity) {
|
||||
this(id, name, display, color, temperature, humidity, 0xffffff, 0xffffffff, 0xffffffff);
|
||||
private Biome(String name, String display, int color, float temperature) {
|
||||
this(name, display, color, temperature, 50.0f);
|
||||
}
|
||||
|
||||
private Biome(int id, String name, String display, int color, float temperature) {
|
||||
this(id, name, display, color, temperature, 50.0f, 0xffffff, 0xffffffff, 0xffffffff);
|
||||
}
|
||||
|
||||
private Biome(int id, String name, String display, int color) {
|
||||
this(id, name, display, color, 0.0f, 50.0f, 0xffffff, 0xffffffff, 0xffffffff);
|
||||
private Biome(String name, String display, int color) {
|
||||
this(name, display, color, 0.0f, 50.0f);
|
||||
}
|
||||
|
||||
public final float getTemperature(BlockPos pos) {
|
||||
|
@ -195,37 +182,9 @@ public enum Biome implements Identifyable, Displayable {
|
|||
return f > 1.0f ? 1.0f : f;
|
||||
}
|
||||
|
||||
public boolean isHighHumidity() {
|
||||
return this.humidity > 85.0f;
|
||||
}
|
||||
|
||||
// skycolor = ((temp + 14) / 40 + 0.15) / 3
|
||||
|
||||
public int getGrassColorAtPos(BlockPos pos) {
|
||||
if(this.grassColor != 0xffffffff)
|
||||
return this.grassColor;
|
||||
if(this == SWAMPLAND || this == SWAMPLANDM) {
|
||||
double d0 = COLOR_NOISE.generate((double)pos.getX() * 0.0225D, (double)pos.getZ() * 0.0225D);
|
||||
return d0 < -0.1D ? 5011004 : 6975545;
|
||||
}
|
||||
if(this == ELVENFOREST)
|
||||
return Colorizer.getGrassColor(1.0f, this.humidity * 0.01f);
|
||||
double d0 = (double)ExtMath.clampf((this.getTemperature(pos) + 14.0f) / 40.0f + 0.15f, 0.0F, 1.0F);
|
||||
double d1 = (double)ExtMath.clampf(this.humidity * 0.01f, 0.0F, 1.0F);
|
||||
return this == ROOFEDFOREST || this == ROOFEDFORESTM ? (Colorizer.getGrassColor(d0, d1) & 16711422) + 2634762 >> 1 : Colorizer.getGrassColor(d0, d1);
|
||||
}
|
||||
|
||||
public int getFoliageColorAtPos(BlockPos pos) {
|
||||
if(this.foliageColor != 0xffffffff)
|
||||
return this.foliageColor;
|
||||
if(this == ELVENFOREST)
|
||||
return Colorizer.getFoliageColor(1.0f, this.humidity * 0.01f);
|
||||
double d0 = (double)ExtMath.clampf((this.getTemperature(pos) + 14.0f) / 40.0f + 0.15f, 0.0F, 1.0F);
|
||||
double d1 = (double)ExtMath.clampf(this.humidity * 0.01f, 0.0F, 1.0F);
|
||||
return Colorizer.getFoliageColor(d0, d1);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
|
|
|
@ -15,6 +15,7 @@ import java.util.function.Function;
|
|||
|
||||
import common.attributes.Attribute;
|
||||
import common.attributes.UsageSlot;
|
||||
import common.biome.Biome;
|
||||
import common.block.artificial.BlockSlab;
|
||||
import common.block.natural.BlockSnow;
|
||||
import common.collect.ImmutableList;
|
||||
|
@ -39,7 +40,7 @@ import common.item.StackSize;
|
|||
import common.model.BlockLayer;
|
||||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.properties.Property;
|
||||
import common.rng.Random;
|
||||
import common.tileentity.TileEntity;
|
||||
|
@ -1033,14 +1034,14 @@ public class Block {
|
|||
}
|
||||
return light;
|
||||
}
|
||||
|
||||
public BlockLayer getRenderLayer() {
|
||||
return BlockLayer.SOLID;
|
||||
}
|
||||
|
||||
public int getRenderType() {
|
||||
return 3;
|
||||
}
|
||||
|
||||
public BlockLayer getRenderLayer() {
|
||||
return BlockLayer.SOLID;
|
||||
}
|
||||
|
||||
public boolean isXrayVisible() {
|
||||
return false;
|
||||
|
@ -1053,41 +1054,18 @@ public class Block {
|
|||
public void getAnimatedTextures(Map<String, Object> map) {
|
||||
}
|
||||
|
||||
public int getRenderColor(State state) {
|
||||
return 16777215;
|
||||
}
|
||||
|
||||
public int colorMultiplier(IWorldAccess world, BlockPos pos, int pass) {
|
||||
return 16777215;
|
||||
}
|
||||
|
||||
public State getEntityState(State state) {
|
||||
return state;
|
||||
}
|
||||
|
||||
public Model getModel(ModelProvider provider, String name, State state) {
|
||||
return provider.getModel(name).add().all();
|
||||
}
|
||||
|
||||
public String getFallbackTexture() {
|
||||
return null;
|
||||
}
|
||||
|
||||
public void setItemBounds() {
|
||||
}
|
||||
|
||||
public Transform getTransform() {
|
||||
return Transform.IDENTITY;
|
||||
public GuiPosition getItemPosition() {
|
||||
return GuiPosition.NORMAL;
|
||||
}
|
||||
|
||||
public State getItemState() {
|
||||
return this.getState();
|
||||
}
|
||||
|
||||
public boolean isItemColored() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public TextColor getItemColor() {
|
||||
return this.radiation > 0.0f ? TextColor.GREEN : null;
|
||||
}
|
||||
|
|
|
@ -102,16 +102,6 @@ public class BlockCake extends Block
|
|||
this.setBlockBounds(f1, 0.0F, f, 1.0F - f, f2, 1.0F - f);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the block's bounds for rendering it as an item
|
||||
*/
|
||||
public void setItemBounds()
|
||||
{
|
||||
float f = 0.0625F;
|
||||
float f1 = 0.5F;
|
||||
this.setBlockBounds(f, 0.0F, f, 1.0F - f, f1, 1.0F - f);
|
||||
}
|
||||
|
||||
public BoundingBox getCollisionBox(World worldIn, BlockPos pos, State state)
|
||||
{
|
||||
float f = 0.0625F;
|
||||
|
|
|
@ -6,7 +6,7 @@ import common.color.DyeColor;
|
|||
import common.item.CheatTab;
|
||||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.util.BlockPos;
|
||||
import common.util.Facing;
|
||||
import common.world.IWorldAccess;
|
||||
|
@ -51,14 +51,6 @@ public class BlockCarpet extends Block
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the block's bounds for rendering it as an item
|
||||
*/
|
||||
public void setItemBounds()
|
||||
{
|
||||
this.setBlockBoundsFromMeta();
|
||||
}
|
||||
|
||||
public void setBlockBounds(IWorldAccess worldIn, BlockPos pos)
|
||||
{
|
||||
this.setBlockBoundsFromMeta();
|
||||
|
|
|
@ -17,7 +17,7 @@ import common.model.BlockLayer;
|
|||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.ModelRotation;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.properties.Property;
|
||||
import common.properties.PropertyBool;
|
||||
import common.properties.PropertyEnum;
|
||||
|
@ -285,8 +285,8 @@ public class BlockDoor extends Block implements Rotatable {
|
|||
}
|
||||
}
|
||||
|
||||
public Transform getTransform() {
|
||||
return Transform.PANE_SIDE;
|
||||
public GuiPosition getItemPosition() {
|
||||
return GuiPosition.PANE_SIDE;
|
||||
}
|
||||
|
||||
public State getItemState() {
|
||||
|
|
|
@ -13,7 +13,7 @@ import common.item.tool.ItemLead;
|
|||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.ModelRotation;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.properties.Property;
|
||||
import common.properties.PropertyBool;
|
||||
import common.util.BlockPos;
|
||||
|
@ -194,8 +194,8 @@ public class BlockFence extends Block
|
|||
return new Property[] {NORTH, EAST, WEST, SOUTH};
|
||||
}
|
||||
|
||||
public Transform getTransform() {
|
||||
return Transform.FENCE;
|
||||
public GuiPosition getItemPosition() {
|
||||
return GuiPosition.FENCE;
|
||||
}
|
||||
|
||||
public String getTexture() {
|
||||
|
|
|
@ -11,7 +11,7 @@ import common.item.CheatTab;
|
|||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.ModelRotation;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.properties.Property;
|
||||
import common.properties.PropertyBool;
|
||||
import common.util.BlockPos;
|
||||
|
|
|
@ -16,6 +16,7 @@ import common.util.BlockPos;
|
|||
import common.util.BoundingBox;
|
||||
import common.util.Facing;
|
||||
import common.util.ParticleType;
|
||||
import common.util.PortalType;
|
||||
import common.world.IWorldAccess;
|
||||
import common.world.AWorldClient;
|
||||
import common.world.State;
|
||||
|
@ -88,7 +89,7 @@ public class BlockFloorPortal extends Block
|
|||
// entityIn.travelToDimension(entityIn.dimension == 1 ? 0 : 1, null, 0.0f, 0.0f);
|
||||
// }
|
||||
if(entityIn.getEntityBoundingBox().intersectsWith(this.getCollisionBox(worldIn, pos, state)))
|
||||
entityIn.setFlatPortal();
|
||||
entityIn.setPortal(PortalType.FLOOR);
|
||||
}
|
||||
|
||||
public void displayTick(AWorldClient worldIn, BlockPos pos, State state, Random rand)
|
||||
|
|
|
@ -16,7 +16,7 @@ import common.item.ItemStack;
|
|||
import common.model.BlockLayer;
|
||||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.rng.Random;
|
||||
import common.util.BlockPos;
|
||||
import common.util.Facing;
|
||||
|
@ -109,18 +109,10 @@ public class BlockFlowerPot extends Block
|
|||
{
|
||||
super(Material.SMALL);
|
||||
this.content = content;
|
||||
this.setItemBounds();
|
||||
POTS.add(this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the block's bounds for rendering it as an item
|
||||
*/
|
||||
public void setItemBounds()
|
||||
{
|
||||
float f = 0.375F;
|
||||
float f1 = f / 2.0F;
|
||||
this.setBlockBounds(0.5F - f1, 0.0F, 0.5F - f1, 0.5F + f1, f, 0.5F + f1);
|
||||
POTS.add(this);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -262,7 +254,7 @@ public class BlockFlowerPot extends Block
|
|||
return this.content == null;
|
||||
}
|
||||
|
||||
public Transform getTransform() {
|
||||
return Transform.SMALL;
|
||||
public GuiPosition getItemPosition() {
|
||||
return GuiPosition.SMALL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,7 +9,7 @@ import common.model.BlockLayer;
|
|||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.ModelRotation;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.properties.Property;
|
||||
import common.util.BlockPos;
|
||||
import common.util.BoundingBox;
|
||||
|
@ -149,7 +149,7 @@ public class BlockLadder extends Block implements Rotatable
|
|||
.rotate(ModelRotation.getNorthRot(state.getValue(FACING)));
|
||||
}
|
||||
|
||||
public Transform getTransform() {
|
||||
return Transform.PANE_SIDE;
|
||||
public GuiPosition getItemPosition() {
|
||||
return GuiPosition.PANE_SIDE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ import common.model.BlockLayer;
|
|||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.ModelRotation;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.properties.Property;
|
||||
import common.properties.PropertyBool;
|
||||
import common.rng.Random;
|
||||
|
@ -121,14 +121,6 @@ public class BlockPane extends Block
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the block's bounds for rendering it as an item
|
||||
*/
|
||||
public void setItemBounds()
|
||||
{
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
public void setBlockBounds(IWorldAccess worldIn, BlockPos pos)
|
||||
{
|
||||
float f = 0.4375F;
|
||||
|
@ -494,8 +486,8 @@ public class BlockPane extends Block
|
|||
return new Property[] {NORTH, SOUTH, WEST, EAST};
|
||||
}
|
||||
|
||||
public Transform getTransform() {
|
||||
return Transform.PANE;
|
||||
public GuiPosition getItemPosition() {
|
||||
return GuiPosition.PANE;
|
||||
}
|
||||
|
||||
public State getItemState() {
|
||||
|
|
|
@ -1,10 +1,12 @@
|
|||
package common.block.artificial;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
import common.block.Block;
|
||||
import common.block.Material;
|
||||
import common.block.natural.BlockFire;
|
||||
import common.collect.Lists;
|
||||
import common.entity.Entity;
|
||||
import common.init.Blocks;
|
||||
import common.item.Item;
|
||||
|
@ -19,6 +21,7 @@ import common.util.BlockPos;
|
|||
import common.util.BoundingBox;
|
||||
import common.util.Facing;
|
||||
import common.util.ParticleType;
|
||||
import common.util.PortalType;
|
||||
import common.world.IWorldAccess;
|
||||
import common.world.AWorldClient;
|
||||
import common.world.State;
|
||||
|
@ -27,15 +30,25 @@ import common.world.World;
|
|||
public class BlockPortal extends Block
|
||||
{
|
||||
public static final PropertyEnum<Facing.Axis> AXIS = PropertyEnum.<Facing.Axis>create("axis", Facing.Axis.class, Facing.Axis.X, Facing.Axis.Z);
|
||||
public static final PropertyInteger DIM = PropertyInteger.create("dim", 0, 7);
|
||||
|
||||
public static final BlockPortal[] PORTALS = new BlockPortal[PortalType.values().length - 2];
|
||||
private static final int[] COLORS = new int[] {0x000000, 0xff0000, 0xffff00, 0x00ff00, 0x00ffff, 0x0000ff, 0xff00ff, 0xffffff};
|
||||
|
||||
private final PortalType type;
|
||||
|
||||
public static BlockPortal getByType(PortalType type) {
|
||||
return type.ordinal() >= PORTALS.length ? null : PORTALS[type.ordinal()];
|
||||
}
|
||||
|
||||
public BlockPortal()
|
||||
public BlockPortal(PortalType type)
|
||||
{
|
||||
super(Material.PORTAL);
|
||||
this.setDefaultState(this.getBaseState().withProperty(AXIS, Facing.Axis.X).withProperty(DIM, 0));
|
||||
// this.setTickRandomly();
|
||||
this.setDefaultState(this.getBaseState().withProperty(AXIS, Facing.Axis.X));
|
||||
this.type = type;
|
||||
PORTALS[type.ordinal()] = this;
|
||||
}
|
||||
|
||||
public PortalType getType() {
|
||||
return this.type;
|
||||
}
|
||||
|
||||
// public void updateTick(IWorldServer worldIn, BlockPos pos, IBlockState state, Random rand)
|
||||
|
@ -106,9 +119,9 @@ public class BlockPortal extends Block
|
|||
return BlockLayer.TRANSLUCENT;
|
||||
}
|
||||
|
||||
public boolean tryIgnitePortal(World worldIn, BlockPos pos, int dim)
|
||||
public boolean tryIgnitePortal(World worldIn, BlockPos pos)
|
||||
{
|
||||
BlockPortal.Size size = new BlockPortal.Size(worldIn, pos, Facing.Axis.X, dim);
|
||||
BlockPortal.Size size = new BlockPortal.Size(worldIn, pos, Facing.Axis.X, this);
|
||||
|
||||
if (size.func_150860_b() && size.field_150864_e == 0)
|
||||
{
|
||||
|
@ -117,7 +130,7 @@ public class BlockPortal extends Block
|
|||
}
|
||||
else
|
||||
{
|
||||
BlockPortal.Size size2 = new BlockPortal.Size(worldIn, pos, Facing.Axis.Z, dim);
|
||||
BlockPortal.Size size2 = new BlockPortal.Size(worldIn, pos, Facing.Axis.Z, this);
|
||||
|
||||
if (size2.func_150860_b() && size2.field_150864_e == 0)
|
||||
{
|
||||
|
@ -137,11 +150,10 @@ public class BlockPortal extends Block
|
|||
public void onUpdate(World worldIn, BlockPos pos, State state, Block neighborBlock)
|
||||
{
|
||||
Facing.Axis enumfacing$axis = (Facing.Axis)state.getValue(AXIS);
|
||||
int dim = state.getValue(DIM);
|
||||
|
||||
if (enumfacing$axis == Facing.Axis.X)
|
||||
{
|
||||
BlockPortal.Size blockportal$size = new BlockPortal.Size(worldIn, pos, Facing.Axis.X, dim);
|
||||
BlockPortal.Size blockportal$size = new BlockPortal.Size(worldIn, pos, Facing.Axis.X, this);
|
||||
|
||||
if (!blockportal$size.func_150860_b() || blockportal$size.field_150864_e < blockportal$size.field_150868_h * blockportal$size.height)
|
||||
{
|
||||
|
@ -150,7 +162,7 @@ public class BlockPortal extends Block
|
|||
}
|
||||
else if (enumfacing$axis == Facing.Axis.Z)
|
||||
{
|
||||
BlockPortal.Size blockportal$size1 = new BlockPortal.Size(worldIn, pos, Facing.Axis.Z, dim);
|
||||
BlockPortal.Size blockportal$size1 = new BlockPortal.Size(worldIn, pos, Facing.Axis.Z, this);
|
||||
|
||||
if (!blockportal$size1.func_150860_b() || blockportal$size1.field_150864_e < blockportal$size1.field_150868_h * blockportal$size1.height)
|
||||
{
|
||||
|
@ -208,7 +220,7 @@ public class BlockPortal extends Block
|
|||
{
|
||||
if (entityIn.vehicle == null && entityIn.passenger == null)
|
||||
{
|
||||
entityIn.setPortal(state.getValue(DIM));
|
||||
entityIn.setPortal(this.type);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -239,33 +251,23 @@ public class BlockPortal extends Block
|
|||
}
|
||||
}
|
||||
|
||||
public int getRenderColor(State state)
|
||||
{
|
||||
return COLORS[state.getValue(DIM)];
|
||||
}
|
||||
|
||||
public int colorMultiplier(IWorldAccess worldIn, BlockPos pos, int renderPass)
|
||||
{
|
||||
return this.getRenderColor(worldIn.getState(pos));
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {AXIS, DIM};
|
||||
return new Property[] {AXIS};
|
||||
}
|
||||
|
||||
public Model getModel(ModelProvider provider, String name, State state) {
|
||||
return state.getValue(AXIS) == Facing.Axis.X ? provider.getModel(name)
|
||||
.add(0, 0, 6, 16, 16, 10)
|
||||
.n().uv(0, 0, 16, 16).noCull().tint()
|
||||
.s().uv(0, 0, 16, 16).noCull().tint() : provider.getModel(name)
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.s().uv(0, 0, 16, 16).noCull() : provider.getModel(name)
|
||||
.add(6, 0, 0, 10, 16, 16)
|
||||
.w().uv(0, 0, 16, 16).noCull().tint()
|
||||
.e().uv(0, 0, 16, 16).noCull().tint();
|
||||
.w().uv(0, 0, 16, 16).noCull()
|
||||
.e().uv(0, 0, 16, 16).noCull();
|
||||
}
|
||||
|
||||
public void getAnimatedTextures(Map<String, Object> map) {
|
||||
map.put("portal", 1);
|
||||
map.put(this.type.getName() + "_portal", 1);
|
||||
}
|
||||
|
||||
protected boolean hasRegisteredItem() {
|
||||
|
@ -332,13 +334,13 @@ public class BlockPortal extends Block
|
|||
private final Facing.Axis axis;
|
||||
private final Facing field_150866_c;
|
||||
private final Facing field_150863_d;
|
||||
private final int dim;
|
||||
private final BlockPortal dim;
|
||||
private int field_150864_e = 0;
|
||||
private BlockPos field_150861_f;
|
||||
private int height;
|
||||
private int field_150868_h;
|
||||
|
||||
public Size(World worldIn, BlockPos p_i45694_2_, Facing.Axis p_i45694_3_, int dim)
|
||||
public Size(World worldIn, BlockPos p_i45694_2_, Facing.Axis p_i45694_3_, BlockPortal dim)
|
||||
{
|
||||
this.world = worldIn;
|
||||
this.dim = dim;
|
||||
|
@ -424,7 +426,7 @@ public class BlockPortal extends Block
|
|||
break label24;
|
||||
}
|
||||
|
||||
if (block == Blocks.portal)
|
||||
if (block instanceof BlockPortal)
|
||||
{
|
||||
++this.field_150864_e;
|
||||
}
|
||||
|
@ -474,7 +476,7 @@ public class BlockPortal extends Block
|
|||
|
||||
protected boolean func_150857_a(Block p_150857_1_)
|
||||
{
|
||||
return p_150857_1_ == Blocks.air || p_150857_1_ instanceof BlockFire || p_150857_1_ == Blocks.portal;
|
||||
return p_150857_1_ == Blocks.air || p_150857_1_ instanceof BlockFire || p_150857_1_ instanceof BlockPortal;
|
||||
}
|
||||
|
||||
public boolean func_150860_b()
|
||||
|
@ -487,8 +489,7 @@ public class BlockPortal extends Block
|
|||
for (int i = 0; i < this.field_150868_h; ++i)
|
||||
{
|
||||
BlockPos blockpos = this.field_150861_f.offset(this.field_150866_c, i);
|
||||
State state = Blocks.portal.getState().withProperty(BlockPortal.AXIS, this.axis)
|
||||
.withProperty(DIM, this.dim);
|
||||
State state = this.dim.getState().withProperty(BlockPortal.AXIS, this.axis);
|
||||
|
||||
for (int j = 0; j < this.height; ++j)
|
||||
{
|
||||
|
|
|
@ -43,14 +43,6 @@ public class BlockPortalFrame extends Block implements Rotatable
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the block's bounds for rendering it as an item
|
||||
*/
|
||||
public void setItemBounds()
|
||||
{
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.8125F, 1.0F);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add all collision boxes of this Block to the list that intersect with the given mask.
|
||||
*/
|
||||
|
@ -65,7 +57,7 @@ public class BlockPortalFrame extends Block implements Rotatable
|
|||
super.getCollisionBoxes(worldIn, pos, state, mask, list, collidingEntity);
|
||||
}
|
||||
|
||||
this.setItemBounds();
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.8125F, 1.0F);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -8,7 +8,7 @@ import common.entity.types.EntityLiving;
|
|||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.ModelRotation;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.properties.Property;
|
||||
import common.util.BlockPos;
|
||||
import common.util.Facing;
|
||||
|
@ -56,7 +56,7 @@ public class BlockSkull extends Block implements Rotatable {
|
|||
return true;
|
||||
}
|
||||
|
||||
public Transform getTransform() {
|
||||
return Transform.SMALL;
|
||||
public GuiPosition getItemPosition() {
|
||||
return GuiPosition.SMALL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -90,10 +90,6 @@ public class BlockSlab extends Block implements Directional {
|
|||
}
|
||||
}
|
||||
|
||||
public void setItemBounds() {
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.5F, 1.0F);
|
||||
}
|
||||
|
||||
public void getCollisionBoxes(World worldIn, BlockPos pos, State state, BoundingBox mask, List<BoundingBox> list, Entity collidingEntity) {
|
||||
this.setBlockBounds(worldIn, pos);
|
||||
super.getCollisionBoxes(worldIn, pos, state, mask, list, collidingEntity);
|
||||
|
|
|
@ -15,7 +15,7 @@ import common.item.CheatTab;
|
|||
import common.model.BlockLayer;
|
||||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.properties.Property;
|
||||
import common.properties.PropertyEnum;
|
||||
import common.rng.Random;
|
||||
|
@ -775,8 +775,8 @@ public class BlockStairs extends Block implements Rotatable
|
|||
return new Property[] {FACING, HALF, SHAPE};
|
||||
}
|
||||
|
||||
public Transform getTransform() {
|
||||
return Transform.STAIRS;
|
||||
public GuiPosition getItemPosition() {
|
||||
return GuiPosition.STAIRS;
|
||||
}
|
||||
|
||||
public Model getModel(ModelProvider provider, String name, State state) {
|
||||
|
|
|
@ -11,7 +11,7 @@ import common.model.BlockLayer;
|
|||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.ModelRotation;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.properties.Property;
|
||||
import common.properties.PropertyBool;
|
||||
import common.properties.PropertyEnum;
|
||||
|
@ -86,15 +86,6 @@ public class BlockTrapDoor extends Block implements Rotatable
|
|||
this.setBounds(worldIn.getState(pos));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the block's bounds for rendering it as an item
|
||||
*/
|
||||
public void setItemBounds()
|
||||
{
|
||||
float f = 0.1875F;
|
||||
this.setBlockBounds(0.0F, 0.40625F, 0.0F, 1.0F, 0.59375F, 1.0F);
|
||||
}
|
||||
|
||||
public void setBounds(State state)
|
||||
{
|
||||
if (state.getBlock() == this)
|
||||
|
|
|
@ -38,7 +38,7 @@ public class BlockBlackenedSoil extends Block
|
|||
Block block = worldIn.getState(blockpos.up()).getBlock();
|
||||
State iblockstate = worldIn.getState(blockpos);
|
||||
|
||||
if ((iblockstate.getBlock() == Blocks.dirt || iblockstate.getBlock() == Blocks.grass || iblockstate.getBlock() == Blocks.blackened_dirt) && worldIn.getLightFromNeighbors(blockpos.up()) >= 2 && block.getLightOpacity() <= 6)
|
||||
if ((iblockstate.getBlock() == Blocks.dirt || iblockstate.getBlock() == Blocks.grass || iblockstate.getBlock() == Blocks.swamp || iblockstate.getBlock() == Blocks.blackened_dirt) && worldIn.getLightFromNeighbors(blockpos.up()) >= 2 && block.getLightOpacity() <= 6)
|
||||
{
|
||||
worldIn.setState(blockpos, Blocks.blackened_soil.getState());
|
||||
worldIn.setBiome(blockpos, Biome.BLACKENED);
|
||||
|
|
|
@ -4,7 +4,7 @@ import common.block.Block;
|
|||
import common.init.Blocks;
|
||||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.rng.Random;
|
||||
import common.util.BlockPos;
|
||||
import common.vars.Vars;
|
||||
|
@ -87,7 +87,7 @@ public class BlockBlueShroom extends BlockBush
|
|||
return provider.getModel("blue_mushroom").cross();
|
||||
}
|
||||
|
||||
public Transform getTransform() {
|
||||
return Transform.CROSS_SMALL;
|
||||
public GuiPosition getItemPosition() {
|
||||
return GuiPosition.CROSS_SMALL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@ import common.item.ItemStack;
|
|||
import common.item.tool.ItemShears;
|
||||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.rng.Random;
|
||||
import common.tileentity.TileEntity;
|
||||
import common.util.BlockPos;
|
||||
|
@ -77,7 +77,7 @@ public class BlockDeadBush extends BlockBush
|
|||
return provider.getModel("deadbush").cross();
|
||||
}
|
||||
|
||||
public Transform getTransform() {
|
||||
return Transform.CROSS;
|
||||
public GuiPosition getItemPosition() {
|
||||
return GuiPosition.CROSS;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package common.block.foliage;
|
||||
|
||||
import common.biome.Biome;
|
||||
import common.block.Block;
|
||||
import common.block.Material;
|
||||
import common.block.SoundType;
|
||||
import common.color.Colorizer;
|
||||
import common.entity.npc.EntityNPC;
|
||||
import common.entity.types.EntityLiving;
|
||||
import common.init.Blocks;
|
||||
|
@ -14,7 +14,7 @@ import common.item.StackSize;
|
|||
import common.item.tool.ItemShears;
|
||||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.properties.Property;
|
||||
import common.properties.PropertyEnum;
|
||||
import common.rng.Random;
|
||||
|
@ -154,19 +154,6 @@ public class BlockDoublePlant extends BlockBush implements IGrowable
|
|||
}
|
||||
}
|
||||
|
||||
public boolean isItemColored() {
|
||||
return this.type == BlockDoublePlant.EnumPlantType.GRASS || this.type == BlockDoublePlant.EnumPlantType.FERN;
|
||||
}
|
||||
|
||||
public int getRenderColor(State state) {
|
||||
return this.type != BlockDoublePlant.EnumPlantType.GRASS && this.type != BlockDoublePlant.EnumPlantType.FERN ? 16777215 : Colorizer.getGrassColor(0.5D, 1.0D);
|
||||
}
|
||||
|
||||
public int colorMultiplier(IWorldAccess worldIn, BlockPos pos, int renderPass)
|
||||
{
|
||||
return this.type != BlockDoublePlant.EnumPlantType.GRASS && this.type != BlockDoublePlant.EnumPlantType.FERN ? 16777215 : Colorizer.getGrassColor(worldIn, pos);
|
||||
}
|
||||
|
||||
public void placeAt(World worldIn, BlockPos lowerPos, int flags)
|
||||
{
|
||||
worldIn.setState(lowerPos, this.getState().withProperty(HALF, BlockDoublePlant.EnumBlockHalf.LOWER), flags);
|
||||
|
@ -279,16 +266,13 @@ public class BlockDoublePlant extends BlockBush implements IGrowable
|
|||
.uv(0, 8, 16, 16).noCull()
|
||||
.add(9.6f, -1f, 1f, 9.6f, 15f, 15f).noShade().rotate(8, 8, 8, Axis.Z, 22.5f, true).w("sunflower_back")
|
||||
.uv(0, 0, 16, 16).noCull().e().uv(0, 0, 16, 16).noCull();
|
||||
else if(this.type == EnumPlantType.FERN || this.type == EnumPlantType.GRASS)
|
||||
return provider.getModel(this.type.getName() + "_" + (state.getValue(HALF) == EnumBlockHalf.UPPER
|
||||
? "top" : "bottom")).crossTint();
|
||||
else
|
||||
return provider.getModel(this.type.getName() + "_" + (state.getValue(HALF) == EnumBlockHalf.UPPER
|
||||
? "top" : "bottom")).cross();
|
||||
}
|
||||
|
||||
public Transform getTransform() {
|
||||
return Transform.CROSS;
|
||||
public GuiPosition getItemPosition() {
|
||||
return GuiPosition.CROSS;
|
||||
}
|
||||
|
||||
public State getItemState() {
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
package common.block.foliage;
|
||||
|
||||
import common.block.Block;
|
||||
import common.init.Blocks;
|
||||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.rng.Random;
|
||||
import common.util.BlockPos;
|
||||
import common.util.Identifyable;
|
||||
|
@ -31,6 +32,11 @@ public class BlockFlower extends BlockBush
|
|||
public EnumFlowerType getType() {
|
||||
return this.type;
|
||||
}
|
||||
|
||||
protected boolean canPlaceBlockOn(Block ground)
|
||||
{
|
||||
return super.canPlaceBlockOn(ground) || ((this.type == EnumFlowerType.BLUE_ORCHID || this.type == EnumFlowerType.BLACK_LOTUS) && ground == Blocks.swamp);
|
||||
}
|
||||
|
||||
public void tick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
|
||||
{
|
||||
|
@ -47,8 +53,8 @@ public class BlockFlower extends BlockBush
|
|||
return provider.getModel(this.type.getName()).cross();
|
||||
}
|
||||
|
||||
public Transform getTransform() {
|
||||
return Transform.CROSS_SMALL;
|
||||
public GuiPosition getItemPosition() {
|
||||
return GuiPosition.CROSS_SMALL;
|
||||
}
|
||||
|
||||
public static enum EnumFlowerType implements Identifyable
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
package common.block.foliage;
|
||||
|
||||
import common.biome.Biome;
|
||||
import common.biome.IBiome;
|
||||
import common.block.Block;
|
||||
import common.block.Material;
|
||||
import common.color.Colorizer;
|
||||
import common.init.Blocks;
|
||||
import common.item.CheatTab;
|
||||
import common.item.Item;
|
||||
|
@ -32,40 +32,14 @@ public class BlockGrass extends Block implements IGrowable
|
|||
this.setTab(CheatTab.NATURE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the actual Block state of this Block at the given position. This applies properties not visible in the
|
||||
* metadata, such as fence connections.
|
||||
*/
|
||||
public State getState(State state, IWorldAccess worldIn, BlockPos pos)
|
||||
{
|
||||
Block block = worldIn.getState(pos.up()).getBlock();
|
||||
return state.withProperty(SNOWY, Boolean.valueOf(block == Blocks.snow || block == Blocks.snow_layer));
|
||||
}
|
||||
|
||||
// public int getBlockColor()
|
||||
// {
|
||||
// return ColorizerFoliage.getGrassColor(0.5D, 1.0D);
|
||||
// }
|
||||
|
||||
public boolean isItemColored() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int getRenderColor(State state)
|
||||
{
|
||||
return Colorizer.getGrassColor(0.5D, 1.0D);
|
||||
// return this.getBlockColor();
|
||||
}
|
||||
|
||||
public int colorMultiplier(IWorldAccess worldIn, BlockPos pos, int renderPass)
|
||||
{
|
||||
return Colorizer.getGrassColor(worldIn, pos);
|
||||
}
|
||||
|
||||
public void tick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
|
||||
{
|
||||
// if (!worldIn.client)
|
||||
// {
|
||||
if (worldIn.getLightFromNeighbors(pos.up()) < 4 && worldIn.getState(pos.up()).getBlock().getLightOpacity() > 2)
|
||||
{
|
||||
if(Vars.grassDecay)
|
||||
|
@ -93,20 +67,13 @@ public class BlockGrass extends Block implements IGrowable
|
|||
worldIn.setState(pos, worldIn.rand.chance(20) ? Blocks.coarse_dirt.getState() :
|
||||
Blocks.dirt.getState());
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Item that this Block should drop when harvested.
|
||||
*/
|
||||
public Item getDrop(State state, Random rand, int fortune)
|
||||
{
|
||||
return Blocks.dirt.getDrop(Blocks.dirt.getState(), rand, fortune);
|
||||
}
|
||||
|
||||
/**
|
||||
* Whether this IGrowable can grow
|
||||
*/
|
||||
public boolean canGrow(World worldIn, BlockPos pos, State state, boolean isClient)
|
||||
{
|
||||
return true;
|
||||
|
@ -122,22 +89,21 @@ public class BlockGrass extends Block implements IGrowable
|
|||
IBiome.getBiome(worldIn.getBiomeGenForCoords(pos)).growGrass(worldIn, pos, state, rand);
|
||||
}
|
||||
|
||||
public BlockLayer getRenderLayer()
|
||||
{
|
||||
return BlockLayer.CUTOUT_MIPPED;
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {SNOWY};
|
||||
}
|
||||
|
||||
public BlockLayer getRenderLayer()
|
||||
{
|
||||
return BlockLayer.CUTOUT_MIPPED;
|
||||
}
|
||||
|
||||
public Model getModel(ModelProvider provider, String name, State state) {
|
||||
if(state.getValue(SNOWY))
|
||||
return provider.getModel("grass_side_snowed").add().nswe().d("dirt").u("grass_top");
|
||||
return provider.getModel("dirt").add().d().u("snow").nswe().add().nswe("soil_snowed");
|
||||
else
|
||||
return provider.getModel("dirt").add().d().u("grass_top").tint().nswe("grass_side")
|
||||
.add().nswe("grass_side_overlay").tint();
|
||||
return provider.getModel("dirt").add().d().u("grass_top").nswe().add().nswe("grass_side");
|
||||
}
|
||||
|
||||
protected Property[] getUnsavedProperties() {
|
||||
|
|
|
@ -2,11 +2,11 @@ package common.block.foliage;
|
|||
|
||||
import java.util.List;
|
||||
|
||||
import common.biome.Biome;
|
||||
import common.block.Block;
|
||||
import common.block.Material;
|
||||
import common.block.SoundType;
|
||||
import common.collect.Lists;
|
||||
import common.color.Colorizer;
|
||||
import common.entity.npc.EntityNPC;
|
||||
import common.entity.types.EntityLiving;
|
||||
import common.init.Blocks;
|
||||
|
@ -277,23 +277,6 @@ public class BlockLeaves extends BlockLeavesBase
|
|||
dropItem(worldIn, pos, new ItemStack(ItemRegistry.byName(this.type.getItem())));
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isItemColored() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int getRenderColor(State state)
|
||||
{
|
||||
return state.getBlock() != this || !this.subType.isTinted() ? 16777215 :
|
||||
((this.type.getTintType() == null ? Colorizer.BASIC : this.type.getTintType()).getColor());
|
||||
}
|
||||
|
||||
public int colorMultiplier(IWorldAccess worldIn, BlockPos pos, int renderPass)
|
||||
{
|
||||
State state = worldIn.getState(pos);
|
||||
return state.getBlock() != this || !this.subType.isTinted() ? 16777215 : (this.type.getTintType()
|
||||
== null ? Colorizer.getFoliageColor(worldIn, pos) : this.type.getTintType().getColor());
|
||||
}
|
||||
|
||||
protected Property[] getProperties() {
|
||||
return new Property[] {DECAY, BUSH};
|
||||
|
@ -312,11 +295,6 @@ public class BlockLeaves extends BlockLeavesBase
|
|||
return this.getState().withProperty(DECAY, false).withProperty(BUSH, true);
|
||||
}
|
||||
|
||||
public Model getModel(ModelProvider provider, String name, State state) {
|
||||
return this.subType.isTinted() ? provider.getModel(name).add().all().tint() :
|
||||
provider.getModel(name).add().all();
|
||||
}
|
||||
|
||||
public Property<?>[] getIgnoredProperties() {
|
||||
return new Property[] {DECAY, BUSH};
|
||||
}
|
||||
|
|
|
@ -17,7 +17,7 @@ import common.item.ItemStack;
|
|||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.ModelRotation;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.properties.Property;
|
||||
import common.util.BlockPos;
|
||||
import common.util.BoundingBox;
|
||||
|
@ -50,25 +50,6 @@ public class BlockLilyPad extends BlockBush implements Rotatable
|
|||
{
|
||||
return new BoundingBox((double)pos.getX() + this.minX, (double)pos.getY() + this.minY, (double)pos.getZ() + this.minZ, (double)pos.getX() + this.maxX, (double)pos.getY() + this.maxY, (double)pos.getZ() + this.maxZ);
|
||||
}
|
||||
|
||||
// public int getBlockColor()
|
||||
// {
|
||||
// return 7455580;
|
||||
// }
|
||||
|
||||
public boolean isItemColored() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int getRenderColor(State state)
|
||||
{
|
||||
return 7455580;
|
||||
}
|
||||
|
||||
public int colorMultiplier(IWorldAccess worldIn, BlockPos pos, int renderPass)
|
||||
{
|
||||
return 2129968;
|
||||
}
|
||||
|
||||
protected boolean canPlaceBlockOn(Block ground)
|
||||
{
|
||||
|
@ -102,13 +83,13 @@ public class BlockLilyPad extends BlockBush implements Rotatable
|
|||
public Model getModel(ModelProvider provider, String name, State state) {
|
||||
return provider.getModel("waterlily")
|
||||
.add(0, 0.25f, 0, 16, 0.25f, 16)
|
||||
.d().uv(16, 16, 0, 0).tint().noCull()
|
||||
.u().uv(16, 0, 0, 16).tint().noCull()
|
||||
.d().uv(16, 16, 0, 0).noCull()
|
||||
.u().uv(16, 0, 0, 16).noCull()
|
||||
.rotate(ModelRotation.getNorthRot(state.getValue(FACING)));
|
||||
}
|
||||
|
||||
public Transform getTransform() {
|
||||
return Transform.SMALL_FLAT;
|
||||
public GuiPosition getItemPosition() {
|
||||
return GuiPosition.SMALL_FLAT;
|
||||
}
|
||||
|
||||
public boolean prePlace(ItemStack itemStackIn, World worldIn, EntityNPC playerIn)
|
||||
|
|
|
@ -5,7 +5,7 @@ import common.block.Block;
|
|||
import common.init.Blocks;
|
||||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.rng.Random;
|
||||
import common.util.BlockPos;
|
||||
import common.vars.Vars;
|
||||
|
@ -109,7 +109,7 @@ public class BlockMushroom extends BlockBush implements IGrowable
|
|||
return provider.getModel(name).cross();
|
||||
}
|
||||
|
||||
public Transform getTransform() {
|
||||
return Transform.CROSS_SMALL;
|
||||
public GuiPosition getItemPosition() {
|
||||
return GuiPosition.CROSS_SMALL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,6 +5,7 @@ import common.block.Material;
|
|||
import common.init.Blocks;
|
||||
import common.item.CheatTab;
|
||||
import common.item.Item;
|
||||
import common.model.BlockLayer;
|
||||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.properties.Property;
|
||||
|
@ -92,11 +93,16 @@ public class BlockMycelium extends Block
|
|||
return new Property[] {SNOWY};
|
||||
}
|
||||
|
||||
public BlockLayer getRenderLayer()
|
||||
{
|
||||
return BlockLayer.CUTOUT_MIPPED;
|
||||
}
|
||||
|
||||
public Model getModel(ModelProvider provider, String name, State state) {
|
||||
if(state.getValue(SNOWY))
|
||||
return provider.getModel("grass_side_snowed").add().nswe().d("dirt").u("grass_top");
|
||||
return provider.getModel("dirt").add().d().u("snow").nswe().add().nswe("soil_snowed");
|
||||
else
|
||||
return provider.getModel("mycelium_side").add().nswe().d("dirt").u("mycelium_top");
|
||||
return provider.getModel("dirt").add().d().u("mycelium_top").nswe().add().nswe("mycelium_side");
|
||||
}
|
||||
|
||||
protected Property[] getUnsavedProperties() {
|
||||
|
|
|
@ -8,7 +8,7 @@ import common.item.StackSize;
|
|||
import common.model.BlockLayer;
|
||||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.properties.Property;
|
||||
import common.properties.PropertyInteger;
|
||||
import common.rng.Random;
|
||||
|
@ -78,7 +78,7 @@ public class BlockReed extends Block
|
|||
{
|
||||
return true;
|
||||
}
|
||||
else if (block != Blocks.grass && block != Blocks.dirt && block != Blocks.sand)
|
||||
else if (block != Blocks.grass && block != Blocks.swamp && block != Blocks.dirt && block != Blocks.sand)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
@ -141,11 +141,6 @@ public class BlockReed extends Block
|
|||
return false;
|
||||
}
|
||||
|
||||
public int colorMultiplier(IWorldAccess worldIn, BlockPos pos, int renderPass)
|
||||
{
|
||||
return worldIn.getBiomeGenForCoords(pos).getGrassColorAtPos(pos);
|
||||
}
|
||||
|
||||
public BlockLayer getRenderLayer()
|
||||
{
|
||||
return BlockLayer.CUTOUT;
|
||||
|
@ -157,7 +152,7 @@ public class BlockReed extends Block
|
|||
}
|
||||
|
||||
public Model getModel(ModelProvider provider, String name, State state) {
|
||||
return provider.getModel("reeds").crossTint();
|
||||
return provider.getModel("reeds").cross();
|
||||
}
|
||||
|
||||
public Property<?>[] getIgnoredProperties() {
|
||||
|
@ -168,7 +163,7 @@ public class BlockReed extends Block
|
|||
return StackSize.L;
|
||||
}
|
||||
|
||||
public Transform getTransform() {
|
||||
return Transform.CROSS;
|
||||
public GuiPosition getItemPosition() {
|
||||
return GuiPosition.CROSS;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,13 +3,15 @@ package common.block.foliage;
|
|||
import java.util.List;
|
||||
|
||||
import common.biome.IBiome;
|
||||
import common.block.Block;
|
||||
import common.block.foliage.BlockTallGrass.EnumType;
|
||||
import common.collect.Lists;
|
||||
import common.init.Blocks;
|
||||
import common.init.WoodType;
|
||||
import common.item.CheatTab;
|
||||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.properties.Property;
|
||||
import common.properties.PropertyInteger;
|
||||
import common.rng.Random;
|
||||
|
@ -37,6 +39,11 @@ public class BlockSapling extends BlockBush implements IGrowable
|
|||
this.setFlammable(15, 100);
|
||||
SAPLINGS.add(this);
|
||||
}
|
||||
|
||||
protected boolean canPlaceBlockOn(Block ground)
|
||||
{
|
||||
return super.canPlaceBlockOn(ground) || ground == Blocks.swamp;
|
||||
}
|
||||
|
||||
// /**
|
||||
// * Gets the localized name of this block. Used for the statistics page.
|
||||
|
@ -124,8 +131,8 @@ public class BlockSapling extends BlockBush implements IGrowable
|
|||
return provider.getModel(name).cross();
|
||||
}
|
||||
|
||||
public Transform getTransform() {
|
||||
return Transform.CROSS;
|
||||
public GuiPosition getItemPosition() {
|
||||
return GuiPosition.CROSS;
|
||||
}
|
||||
|
||||
public WoodType getWoodType() {
|
||||
|
|
|
@ -87,36 +87,6 @@ public class BlockStem extends BlockBush implements IGrowable
|
|||
worldIn.setState(pos, state.withProperty(AGE, Integer.valueOf(Math.min(7, i))), 2);
|
||||
}
|
||||
|
||||
public int getRenderColor(State state)
|
||||
{
|
||||
if (state.getBlock() != this)
|
||||
{
|
||||
return super.getRenderColor(state);
|
||||
}
|
||||
else
|
||||
{
|
||||
int i = ((Integer)state.getValue(AGE)).intValue();
|
||||
int j = i * 32;
|
||||
int k = 255 - i * 8;
|
||||
int l = i * 4;
|
||||
return j << 16 | k << 8 | l;
|
||||
}
|
||||
}
|
||||
|
||||
public int colorMultiplier(IWorldAccess worldIn, BlockPos pos, int renderPass)
|
||||
{
|
||||
return this.getRenderColor(worldIn.getState(pos));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the block's bounds for rendering it as an item
|
||||
*/
|
||||
public void setItemBounds()
|
||||
{
|
||||
float f = 0.125F;
|
||||
this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, 0.25F, 0.5F + f);
|
||||
}
|
||||
|
||||
public void setBlockBounds(IWorldAccess worldIn, BlockPos pos)
|
||||
{
|
||||
this.maxY = (double)((float)(((Integer)worldIn.getState(pos).getValue(AGE)).intValue() * 2 + 2) / 16.0F);
|
||||
|
@ -174,68 +144,68 @@ public class BlockStem extends BlockBush implements IGrowable
|
|||
case 0:
|
||||
return provider.getModel(stem)
|
||||
.add(0, -1, 8, 16, 1, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true)
|
||||
.n().uv(0, 0, 16, 2).tint().noCull()
|
||||
.s().uv(16, 0, 0, 2).tint().noCull()
|
||||
.n().uv(0, 0, 16, 2).noCull()
|
||||
.s().uv(16, 0, 0, 2).noCull()
|
||||
.add(8, -1, 0, 8, 1, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true)
|
||||
.w().uv(0, 0, 16, 2).tint().noCull()
|
||||
.e().uv(16, 0, 0, 2).tint().noCull();
|
||||
.w().uv(0, 0, 16, 2).noCull()
|
||||
.e().uv(16, 0, 0, 2).noCull();
|
||||
case 1:
|
||||
return provider.getModel(stem)
|
||||
.add(0, -1, 8, 16, 3, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true)
|
||||
.n().uv(0, 0, 16, 4).tint().noCull()
|
||||
.s().uv(16, 0, 0, 4).tint().noCull()
|
||||
.n().uv(0, 0, 16, 4).noCull()
|
||||
.s().uv(16, 0, 0, 4).noCull()
|
||||
.add(8, -1, 0, 8, 3, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true)
|
||||
.w().uv(0, 0, 16, 4).tint().noCull()
|
||||
.e().uv(16, 0, 0, 4).tint().noCull();
|
||||
.w().uv(0, 0, 16, 4).noCull()
|
||||
.e().uv(16, 0, 0, 4).noCull();
|
||||
case 2:
|
||||
return provider.getModel(stem)
|
||||
.add(0, -1, 8, 16, 5, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true)
|
||||
.n().uv(0, 0, 16, 6).tint().noCull()
|
||||
.s().uv(16, 0, 0, 6).tint().noCull()
|
||||
.n().uv(0, 0, 16, 6).noCull()
|
||||
.s().uv(16, 0, 0, 6).noCull()
|
||||
.add(8, -1, 0, 8, 5, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true)
|
||||
.w().uv(0, 0, 16, 6).tint().noCull()
|
||||
.e().uv(16, 0, 0, 6).tint().noCull();
|
||||
.w().uv(0, 0, 16, 6).noCull()
|
||||
.e().uv(16, 0, 0, 6).noCull();
|
||||
case 3:
|
||||
return provider.getModel(stem)
|
||||
.add(0, -1, 8, 16, 7, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true)
|
||||
.n().uv(0, 0, 16, 8).tint().noCull()
|
||||
.s().uv(16, 0, 0, 8).tint().noCull()
|
||||
.n().uv(0, 0, 16, 8).noCull()
|
||||
.s().uv(16, 0, 0, 8).noCull()
|
||||
.add(8, -1, 0, 8, 7, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true)
|
||||
.w().uv(0, 0, 16, 8).tint().noCull()
|
||||
.e().uv(16, 0, 0, 8).tint().noCull();
|
||||
.w().uv(0, 0, 16, 8).noCull()
|
||||
.e().uv(16, 0, 0, 8).noCull();
|
||||
case 4:
|
||||
return provider.getModel(stem)
|
||||
.add(0, -1, 8, 16, 9, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true)
|
||||
.n().uv(0, 0, 16, 10).tint().noCull()
|
||||
.s().uv(16, 0, 0, 10).tint().noCull()
|
||||
.n().uv(0, 0, 16, 10).noCull()
|
||||
.s().uv(16, 0, 0, 10).noCull()
|
||||
.add(8, -1, 0, 8, 9, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true)
|
||||
.w().uv(0, 0, 16, 10).tint().noCull()
|
||||
.e().uv(16, 0, 0, 10).tint().noCull();
|
||||
.w().uv(0, 0, 16, 10).noCull()
|
||||
.e().uv(16, 0, 0, 10).noCull();
|
||||
case 5:
|
||||
return provider.getModel(stem)
|
||||
.add(0, -1, 8, 16, 11, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true)
|
||||
.n().uv(0, 0, 16, 12).tint().noCull()
|
||||
.s().uv(16, 0, 0, 12).tint().noCull()
|
||||
.n().uv(0, 0, 16, 12).noCull()
|
||||
.s().uv(16, 0, 0, 12).noCull()
|
||||
.add(8, -1, 0, 8, 11, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true)
|
||||
.w().uv(0, 0, 16, 12).tint().noCull()
|
||||
.e().uv(16, 0, 0, 12).tint().noCull();
|
||||
.w().uv(0, 0, 16, 12).noCull()
|
||||
.e().uv(16, 0, 0, 12).noCull();
|
||||
case 6:
|
||||
return provider.getModel(stem)
|
||||
.add(0, -1, 8, 16, 13, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true)
|
||||
.n().uv(0, 0, 16, 14).tint().noCull()
|
||||
.s().uv(16, 0, 0, 14).tint().noCull()
|
||||
.n().uv(0, 0, 16, 14).noCull()
|
||||
.s().uv(16, 0, 0, 14).noCull()
|
||||
.add(8, -1, 0, 8, 13, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true)
|
||||
.w().uv(0, 0, 16, 14).tint().noCull()
|
||||
.e().uv(16, 0, 0, 14).tint().noCull();
|
||||
.w().uv(0, 0, 16, 14).noCull()
|
||||
.e().uv(16, 0, 0, 14).noCull();
|
||||
case 7:
|
||||
default:
|
||||
return provider.getModel(stem)
|
||||
.add(0, -1, 8, 16, 15, 8).rotate(8, 8, 8, Facing.Axis.Y, 45, true)
|
||||
.n().uv(0, 0, 16, 16).tint().noCull()
|
||||
.s().uv(16, 0, 0, 16).tint().noCull()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.s().uv(16, 0, 0, 16).noCull()
|
||||
.add(8, -1, 0, 8, 15, 16).rotate(8, 8, 8, Facing.Axis.Y, 45, true)
|
||||
.w().uv(0, 0, 16, 16).tint().noCull()
|
||||
.e().uv(16, 0, 0, 16).tint().noCull();
|
||||
.w().uv(0, 0, 16, 16).noCull()
|
||||
.e().uv(16, 0, 0, 16).noCull();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
93
common/src/main/java/common/block/foliage/BlockSwamp.java
Normal file
93
common/src/main/java/common/block/foliage/BlockSwamp.java
Normal file
|
@ -0,0 +1,93 @@
|
|||
package common.block.foliage;
|
||||
|
||||
import common.block.Block;
|
||||
import common.block.Material;
|
||||
import common.entity.Entity;
|
||||
import common.init.Blocks;
|
||||
import common.item.CheatTab;
|
||||
import common.item.Item;
|
||||
import common.model.BlockLayer;
|
||||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.properties.Property;
|
||||
import common.properties.PropertyBool;
|
||||
import common.rng.Random;
|
||||
import common.util.BlockPos;
|
||||
import common.util.BoundingBox;
|
||||
import common.vars.Vars;
|
||||
import common.world.AWorldServer;
|
||||
import common.world.IWorldAccess;
|
||||
import common.world.State;
|
||||
import common.world.World;
|
||||
|
||||
public class BlockSwamp extends Block
|
||||
{
|
||||
public static final PropertyBool SNOWY = PropertyBool.create("snowy");
|
||||
|
||||
public BlockSwamp()
|
||||
{
|
||||
super(Material.LOOSE);
|
||||
this.setDefaultState(this.getBaseState().withProperty(SNOWY, Boolean.valueOf(false)));
|
||||
this.setTicked();
|
||||
this.setTab(CheatTab.NATURE);
|
||||
}
|
||||
|
||||
public State getState(State state, IWorldAccess worldIn, BlockPos pos)
|
||||
{
|
||||
Block block = worldIn.getState(pos.up()).getBlock();
|
||||
return state.withProperty(SNOWY, Boolean.valueOf(block == Blocks.snow || block == Blocks.snow_layer));
|
||||
}
|
||||
|
||||
public BoundingBox getCollisionBox(World worldIn, BlockPos pos, State state)
|
||||
{
|
||||
float f = 0.375F;
|
||||
return new BoundingBox((double)pos.getX(), (double)pos.getY(), (double)pos.getZ(), (double)(pos.getX() + 1), (double)((float)(pos.getY() + 1) - f), (double)(pos.getZ() + 1));
|
||||
}
|
||||
|
||||
public void onCollideUpdate(World worldIn, BlockPos pos, State state, Entity entityIn)
|
||||
{
|
||||
entityIn.motionX *= 0.6D;
|
||||
entityIn.motionZ *= 0.6D;
|
||||
}
|
||||
|
||||
public BlockLayer getRenderLayer()
|
||||
{
|
||||
return BlockLayer.CUTOUT_MIPPED;
|
||||
}
|
||||
|
||||
public Model getModel(ModelProvider provider, String name, State state) {
|
||||
if(state.getValue(SNOWY))
|
||||
return provider.getModel("dirt").add().d().u("snow").nswe().add().nswe("soil_snowed");
|
||||
else
|
||||
return provider.getModel("dirt").add().d().u("swamp_top").nswe().add().nswe("swamp_side");
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {SNOWY};
|
||||
}
|
||||
|
||||
protected Property[] getUnsavedProperties() {
|
||||
return new Property[] {SNOWY};
|
||||
}
|
||||
|
||||
public Item getDrop(State state, Random rand, int fortune)
|
||||
{
|
||||
return Blocks.dirt.getDrop(Blocks.dirt.getState(), rand, fortune);
|
||||
}
|
||||
|
||||
public void tick(AWorldServer worldIn, BlockPos pos, State state, Random rand)
|
||||
{
|
||||
if (worldIn.getLightFromNeighbors(pos.up()) < 4 && worldIn.getState(pos.up()).getBlock().getLightOpacity() > 2)
|
||||
{
|
||||
if(Vars.swampDecay)
|
||||
worldIn.setState(pos, Blocks.dirt.getState());
|
||||
}
|
||||
else if(Vars.swampDry) {
|
||||
float temp = worldIn.getTemperatureC(pos);
|
||||
if(temp >= 38.0f)
|
||||
worldIn.setState(pos, temp >= 50.0f ? (worldIn.rand.chance(20) ? Blocks.coarse_dirt.getState() :
|
||||
Blocks.dirt.getState()) : Blocks.grass.getState());
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,7 +1,8 @@
|
|||
package common.block.foliage;
|
||||
|
||||
import common.biome.Biome;
|
||||
import common.block.Block;
|
||||
import common.block.Material;
|
||||
import common.color.Colorizer;
|
||||
import common.entity.npc.EntityNPC;
|
||||
import common.init.Blocks;
|
||||
import common.init.Items;
|
||||
|
@ -10,7 +11,7 @@ import common.item.ItemStack;
|
|||
import common.item.tool.ItemShears;
|
||||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.rng.Random;
|
||||
import common.tileentity.TileEntity;
|
||||
import common.util.BlockPos;
|
||||
|
@ -55,6 +56,11 @@ public class BlockTallGrass extends BlockBush implements IGrowable
|
|||
}
|
||||
super.tick(worldIn, pos, state, rand);
|
||||
}
|
||||
|
||||
protected boolean canPlaceBlockOn(Block ground)
|
||||
{
|
||||
return super.canPlaceBlockOn(ground) || (this.type == EnumType.SWAMP_GRASS && ground == Blocks.swamp);
|
||||
}
|
||||
|
||||
public boolean canBlockStay(World worldIn, BlockPos pos, State state)
|
||||
{
|
||||
|
@ -68,27 +74,6 @@ public class BlockTallGrass extends BlockBush implements IGrowable
|
|||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isItemColored() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int getRenderColor(State state)
|
||||
{
|
||||
if (state.getBlock() != this)
|
||||
{
|
||||
return super.getRenderColor(state);
|
||||
}
|
||||
else
|
||||
{
|
||||
return this.type == EnumType.DEAD_BUSH ? 16777215 : Colorizer.getGrassColor(0.5D, 1.0D);
|
||||
}
|
||||
}
|
||||
|
||||
public int colorMultiplier(IWorldAccess worldIn, BlockPos pos, int renderPass)
|
||||
{
|
||||
return worldIn.getBiomeGenForCoords(pos).getGrassColorAtPos(pos);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Item that this Block should drop when harvested.
|
||||
|
@ -147,21 +132,19 @@ public class BlockTallGrass extends BlockBush implements IGrowable
|
|||
}
|
||||
|
||||
public Model getModel(ModelProvider provider, String name, State state) {
|
||||
if(this.type != EnumType.DEAD_BUSH)
|
||||
return provider.getModel(this.type.getName()).crossTint();
|
||||
else
|
||||
return provider.getModel(this.type.getName()).cross();
|
||||
return provider.getModel(this.type.getName()).cross();
|
||||
}
|
||||
|
||||
public Transform getTransform() {
|
||||
return Transform.CROSS;
|
||||
public GuiPosition getItemPosition() {
|
||||
return GuiPosition.CROSS;
|
||||
}
|
||||
|
||||
public static enum EnumType implements Identifyable
|
||||
{
|
||||
DEAD_BUSH("dead_bush", "Busch"),
|
||||
GRASS("tallgrass", "Gras"),
|
||||
FERN("fern", "Farn");
|
||||
FERN("fern", "Farn"),
|
||||
SWAMP_GRASS("swamp_grass", "Sumpfgras");
|
||||
|
||||
private final String name;
|
||||
private final String display;
|
||||
|
|
|
@ -5,6 +5,7 @@ import common.block.Material;
|
|||
import common.init.Blocks;
|
||||
import common.item.CheatTab;
|
||||
import common.item.Item;
|
||||
import common.model.BlockLayer;
|
||||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.properties.Property;
|
||||
|
@ -41,11 +42,16 @@ public class BlockTianSoil extends Block
|
|||
return new Property[] {SNOWY};
|
||||
}
|
||||
|
||||
public BlockLayer getRenderLayer()
|
||||
{
|
||||
return BlockLayer.CUTOUT_MIPPED;
|
||||
}
|
||||
|
||||
public Model getModel(ModelProvider provider, String name, State state) {
|
||||
if(state.getValue(SNOWY))
|
||||
return provider.getModel("tian_soil_side_snowed").add().nswe().d("tian").u("grass_top");
|
||||
return provider.getModel("tian").add().d().u("snow").nswe().add().nswe("tian_soil_snowed");
|
||||
else
|
||||
return provider.getModel("tian_soil_side").add().nswe().d("tian").u("tian_soil_top");
|
||||
return provider.getModel("tian").add().d().u("tian_soil_top").nswe().add().nswe("tian_soil_side");
|
||||
}
|
||||
|
||||
protected Property[] getUnsavedProperties() {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package common.block.foliage;
|
||||
|
||||
import common.biome.Biome;
|
||||
import common.block.Block;
|
||||
import common.block.Material;
|
||||
import common.color.Colorizer;
|
||||
import common.entity.npc.EntityNPC;
|
||||
import common.entity.types.EntityLiving;
|
||||
import common.init.Blocks;
|
||||
|
@ -15,7 +15,7 @@ import common.model.BlockLayer;
|
|||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.ModelRotation;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.properties.Property;
|
||||
import common.properties.PropertyBool;
|
||||
import common.rng.Random;
|
||||
|
@ -37,10 +37,13 @@ public class BlockVine extends Block
|
|||
public static final PropertyBool SOUTH = PropertyBool.create("south");
|
||||
public static final PropertyBool WEST = PropertyBool.create("west");
|
||||
public static final PropertyBool[] ALL_FACES = new PropertyBool[] {UP, NORTH, SOUTH, WEST, EAST};
|
||||
|
||||
private final boolean swamp;
|
||||
|
||||
public BlockVine()
|
||||
public BlockVine(boolean swamp)
|
||||
{
|
||||
super(Material.BUSH);
|
||||
this.swamp = swamp;
|
||||
this.setDefaultState(this.getBaseState().withProperty(UP, Boolean.valueOf(false)).withProperty(NORTH, Boolean.valueOf(false)).withProperty(EAST, Boolean.valueOf(false)).withProperty(SOUTH, Boolean.valueOf(false)).withProperty(WEST, Boolean.valueOf(false)));
|
||||
this.setTicked();
|
||||
this.setTab(CheatTab.PLANTS);
|
||||
|
@ -56,14 +59,6 @@ public class BlockVine extends Block
|
|||
return state.withProperty(UP, Boolean.valueOf(worldIn.getState(pos.up()).getBlock().isBlockingCube()));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the block's bounds for rendering it as an item
|
||||
*/
|
||||
public void setItemBounds()
|
||||
{
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
/**
|
||||
* Used to determine ambient occlusion and culling when rebuilding chunks for render
|
||||
*/
|
||||
|
@ -218,25 +213,6 @@ public class BlockVine extends Block
|
|||
}
|
||||
}
|
||||
|
||||
// public int getBlockColor()
|
||||
// {
|
||||
// return ColorizerFoliage.getFoliageColorBasic();
|
||||
// }
|
||||
|
||||
public boolean isItemColored() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public int getRenderColor(State state)
|
||||
{
|
||||
return Colorizer.BASIC.getColor();
|
||||
}
|
||||
|
||||
public int colorMultiplier(IWorldAccess worldIn, BlockPos pos, int renderPass)
|
||||
{
|
||||
return worldIn.getBiomeGenForCoords(pos).getFoliageColorAtPos(pos);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called when a neighboring block changes.
|
||||
*/
|
||||
|
@ -432,7 +408,7 @@ public class BlockVine extends Block
|
|||
if (!worldIn.client && player.getCurrentEquippedItem() != null && player.getCurrentEquippedItem().getItem() instanceof ItemShears)
|
||||
{
|
||||
// player.triggerAchievement(StatRegistry.mineBlockStatArray[BlockRegistry.getIdFromBlock(this)]);
|
||||
dropItem(worldIn, pos, new ItemStack(Items.vine));
|
||||
dropItem(worldIn, pos, new ItemStack(this.getItem()));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -490,11 +466,11 @@ public class BlockVine extends Block
|
|||
}
|
||||
|
||||
public Model getModel(ModelProvider provider, String name, State state) {
|
||||
Model model = provider.getModel("vine");
|
||||
Model model = provider.getModel(name);
|
||||
if(state.getValue(UP))
|
||||
model.add(0, 15.2f, 0, 16, 15.2f, 16).noShade()
|
||||
.d().uv(0, 0, 16, 16).tint().noCull()
|
||||
.u().uv(0, 0, 16, 16).tint().noCull();
|
||||
.d().uv(0, 0, 16, 16).noCull()
|
||||
.u().uv(0, 0, 16, 16).noCull();
|
||||
boolean n = state.getValue(NORTH);
|
||||
boolean s = state.getValue(SOUTH);
|
||||
boolean w = state.getValue(WEST);
|
||||
|
@ -506,53 +482,53 @@ public class BlockVine extends Block
|
|||
}
|
||||
if(sides == 4) {
|
||||
return model.add(0.8f, 0, 0, 0.8f, 16, 16).noShade()
|
||||
.w().uv(0, 0, 16, 16).tint().noCull()
|
||||
.e().uv(0, 0, 16, 16).tint().noCull()
|
||||
.w().uv(0, 0, 16, 16).noCull()
|
||||
.e().uv(0, 0, 16, 16).noCull()
|
||||
.add(15.2f, 0, 0, 15.2f, 16, 16).noShade()
|
||||
.w().uv(0, 0, 16, 16).tint().noCull()
|
||||
.e().uv(0, 0, 16, 16).tint().noCull()
|
||||
.w().uv(0, 0, 16, 16).noCull()
|
||||
.e().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 0, 15.2f, 16, 16, 15.2f).noShade()
|
||||
.n().uv(0, 0, 16, 16).tint().noCull()
|
||||
.s().uv(0, 0, 16, 16).tint().noCull()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 0, 0.8f, 16, 16, 0.8f).noShade()
|
||||
.n().uv(0, 0, 16, 16).tint().noCull()
|
||||
.s().uv(0, 0, 16, 16).tint().noCull();
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.s().uv(0, 0, 16, 16).noCull();
|
||||
}
|
||||
else if(sides == 1) {
|
||||
return model.add(0, 0, 15.2f, 16, 16, 15.2f).noShade()
|
||||
.n().uv(0, 0, 16, 16).tint().noCull()
|
||||
.s().uv(0, 0, 16, 16).tint().noCull()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.rotate(s ? ModelRotation.X0_Y0 : (n ? ModelRotation.X0_Y180 : (e ? ModelRotation.X0_Y270 : ModelRotation.X0_Y90)));
|
||||
}
|
||||
else if(sides == 2 && ((e != w) || (n != s))) {
|
||||
return model.add(0, 0, 0.8f, 16, 16, 0.8f).noShade()
|
||||
.n().uv(0, 0, 16, 16).tint().noCull()
|
||||
.s().uv(0, 0, 16, 16).tint().noCull()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.add(15.2f, 0, 0, 15.2f, 16, 16).noShade()
|
||||
.w().uv(0, 0, 16, 16).tint().noCull()
|
||||
.e().uv(0, 0, 16, 16).tint().noCull()
|
||||
.w().uv(0, 0, 16, 16).noCull()
|
||||
.e().uv(0, 0, 16, 16).noCull()
|
||||
.rotate(n && e ? ModelRotation.X0_Y0 : (s && w ? ModelRotation.X0_Y180 :
|
||||
(n && w ? ModelRotation.X0_Y270 : ModelRotation.X0_Y90)));
|
||||
}
|
||||
else if(sides == 2) {
|
||||
return model.add(15.2f, 0, 0, 15.2f, 16, 16).noShade()
|
||||
.w().uv(0, 0, 16, 16).tint().noCull()
|
||||
.e().uv(0, 0, 16, 16).tint().noCull()
|
||||
.w().uv(0, 0, 16, 16).noCull()
|
||||
.e().uv(0, 0, 16, 16).noCull()
|
||||
.add(0.8f, 0, 0, 0.8f, 16, 16).noShade()
|
||||
.w().uv(0, 0, 16, 16).tint().noCull()
|
||||
.e().uv(0, 0, 16, 16).tint().noCull()
|
||||
.w().uv(0, 0, 16, 16).noCull()
|
||||
.e().uv(0, 0, 16, 16).noCull()
|
||||
.rotate(e ? ModelRotation.X0_Y0 : ModelRotation.X0_Y90);
|
||||
}
|
||||
else if(sides == 3) {
|
||||
return model.add(15.2f, 0, 0, 15.2f, 16, 16).noShade()
|
||||
.w().uv(0, 0, 16, 16).tint().noCull()
|
||||
.e().uv(0, 0, 16, 16).tint().noCull()
|
||||
.w().uv(0, 0, 16, 16).noCull()
|
||||
.e().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 0, 15.2f, 16, 16, 15.2f).noShade()
|
||||
.n().uv(0, 0, 16, 16).tint().noCull()
|
||||
.s().uv(0, 0, 16, 16).tint().noCull()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 0, 0.8f, 16, 16, 0.8f).noShade()
|
||||
.n().uv(0, 0, 16, 16).tint().noCull()
|
||||
.s().uv(0, 0, 16, 16).tint().noCull()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.rotate(!w ? ModelRotation.X0_Y0 : (!e ? ModelRotation.X0_Y180 : (!s ? ModelRotation.X0_Y270 : ModelRotation.X0_Y90)));
|
||||
}
|
||||
else {
|
||||
|
@ -560,8 +536,8 @@ public class BlockVine extends Block
|
|||
}
|
||||
}
|
||||
|
||||
public Transform getTransform() {
|
||||
return Transform.PANE_SIDE;
|
||||
public GuiPosition getItemPosition() {
|
||||
return GuiPosition.PANE_SIDE;
|
||||
}
|
||||
|
||||
protected Property[] getUnsavedProperties() {
|
||||
|
|
|
@ -3,19 +3,17 @@ package common.block.foliage;
|
|||
import common.util.Identifyable;
|
||||
|
||||
public enum LeavesType implements Identifyable {
|
||||
SPRING("spring", true, "Frühling"),
|
||||
SUMMER("summer", true, "Sommer"),
|
||||
AUTUMN("autumn", false, "Herbst"),
|
||||
WINTER("winter", false, "Winter"),
|
||||
SNOWY("snowy", false, "Beschneit");
|
||||
SPRING("spring", "Frühling"),
|
||||
SUMMER("summer", "Sommer"),
|
||||
AUTUMN("autumn", "Herbst"),
|
||||
WINTER("winter", "Winter"),
|
||||
SNOWY("snowy", "Beschneit");
|
||||
|
||||
private final String name;
|
||||
private final boolean tint;
|
||||
private final String display;
|
||||
|
||||
private LeavesType(String name, boolean tint, String display) {
|
||||
private LeavesType(String name, String display) {
|
||||
this.name = name;
|
||||
this.tint = tint;
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
|
@ -26,10 +24,6 @@ public enum LeavesType implements Identifyable {
|
|||
public String getDisplayName() {
|
||||
return this.display;
|
||||
}
|
||||
|
||||
public boolean isTinted() {
|
||||
return this.tint;
|
||||
}
|
||||
|
||||
public static LeavesType getByName(String name) {
|
||||
for(LeavesType type : values()) {
|
||||
|
|
|
@ -317,10 +317,4 @@ public class BlockDynamicLiquid extends BlockLiquid
|
|||
public void getAnimatedTextures(Map<String, Object> map) {
|
||||
map.put(BlockRegistry.getName(this.staticBlock) + "_flow", this.animation);
|
||||
}
|
||||
|
||||
public String getFallbackTexture() {
|
||||
if(this.cachedTexture == null)
|
||||
this.cachedTexture = BlockRegistry.getName(this.staticBlock) + "_still";
|
||||
return this.cachedTexture;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ import java.util.List;
|
|||
import common.block.Block;
|
||||
import common.block.Material;
|
||||
import common.collect.Lists;
|
||||
import common.color.Colorizer;
|
||||
import common.entity.Entity;
|
||||
import common.init.Blocks;
|
||||
import common.init.SoundEvent;
|
||||
|
@ -38,8 +37,6 @@ public abstract class BlockLiquid extends Block
|
|||
protected final int flowRate;
|
||||
protected final Object animation;
|
||||
|
||||
protected String cachedTexture;
|
||||
|
||||
public BlockLiquid(Material materialIn, boolean tick, boolean opaque, int rate, Object animation)
|
||||
{
|
||||
super(materialIn);
|
||||
|
@ -61,11 +58,6 @@ public abstract class BlockLiquid extends Block
|
|||
return !this.material.isHotLiquid();
|
||||
}
|
||||
|
||||
public int colorMultiplier(IWorldAccess worldIn, BlockPos pos, int renderPass)
|
||||
{
|
||||
return this.material == Material.WATER ? Colorizer.getWaterColor(worldIn, pos) : 16777215;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the percentage of the liquid block that is air, based on the given flow decay of the liquid
|
||||
*/
|
||||
|
@ -116,7 +108,8 @@ public abstract class BlockLiquid extends Block
|
|||
|
||||
public boolean canRender(IWorldAccess worldIn, BlockPos pos, Facing side)
|
||||
{
|
||||
return worldIn.getState(pos).getBlock().getMaterial() == this.material ? false : (side == Facing.UP ? true : super.canRender(worldIn, pos, side));
|
||||
Material material = worldIn.getState(pos).getBlock().getMaterial();
|
||||
return material.isLiquid() && (material.isColdLiquid() == this.material.isColdLiquid()) ? false : (side == Facing.UP ? true : super.canRender(worldIn, pos, side));
|
||||
}
|
||||
|
||||
public boolean shouldRenderSides(IBlockAccess blockAccess, BlockPos pos)
|
||||
|
@ -129,7 +122,7 @@ public abstract class BlockLiquid extends Block
|
|||
Block block = iblockstate.getBlock();
|
||||
Material material = block.getMaterial();
|
||||
|
||||
if (material != this.material && !block.isFullBlock())
|
||||
if ((!material.isLiquid() || (material.isColdLiquid() != this.material.isColdLiquid())) && !block.isFullBlock())
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -116,10 +116,4 @@ public class BlockStaticLiquid extends BlockLiquid
|
|||
public void getAnimatedTextures(Map<String, Object> map) {
|
||||
map.put(BlockRegistry.getName(this) + "_still", this.animation);
|
||||
}
|
||||
|
||||
public String getFallbackTexture() {
|
||||
if(this.cachedTexture == null)
|
||||
this.cachedTexture = BlockRegistry.getName(this) + "_still";
|
||||
return this.cachedTexture;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
package common.block.natural;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import common.model.TextureAnimation;
|
||||
|
||||
public class BlockBlackFire extends BlockFire {
|
||||
public void getAnimatedTextures(Map<String, Object> map) {
|
||||
map.put("black_fire_layer_0", TextureAnimation.BLACK_FLAME_BASE);
|
||||
map.put("black_fire_layer_1", TextureAnimation.BLACK_FLAME_OFFSET);
|
||||
}
|
||||
}
|
|
@ -34,7 +34,7 @@ public class BlockBlackenedDirt extends Block
|
|||
{
|
||||
worldIn.setState(blockpos, Blocks.blackened_dirt.getState());
|
||||
}
|
||||
else if (iblockstate.getBlock() == Blocks.grass && worldIn.getLightFromNeighbors(blockpos.up()) >= 2 && block.getLightOpacity() <= 6)
|
||||
else if ((iblockstate.getBlock() == Blocks.grass || iblockstate.getBlock() == Blocks.swamp) && worldIn.getLightFromNeighbors(blockpos.up()) >= 2 && block.getLightOpacity() <= 6)
|
||||
{
|
||||
worldIn.setState(blockpos, Blocks.blackened_soil.getState());
|
||||
worldIn.setBiome(blockpos, Biome.BLACKENED);
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.util.Map;
|
|||
|
||||
import common.block.Block;
|
||||
import common.block.Material;
|
||||
import common.block.artificial.BlockPortal;
|
||||
import common.init.Blocks;
|
||||
import common.init.SoundEvent;
|
||||
import common.item.Item;
|
||||
|
@ -20,6 +21,7 @@ import common.util.BlockPos;
|
|||
import common.util.BoundingBox;
|
||||
import common.util.Facing;
|
||||
import common.util.ParticleType;
|
||||
import common.util.PortalType;
|
||||
import common.vars.Vars;
|
||||
import common.world.IBlockAccess;
|
||||
import common.world.IWorldAccess;
|
||||
|
@ -161,10 +163,10 @@ public class BlockFire extends Block
|
|||
// }
|
||||
}
|
||||
|
||||
boolean flag1 = worldIn.isBlockinHighHumidity(pos);
|
||||
boolean cold = worldIn.getTemperatureC(pos) < 10.0f;
|
||||
int j = 0;
|
||||
|
||||
if (flag1)
|
||||
if (cold)
|
||||
{
|
||||
j = -50;
|
||||
}
|
||||
|
@ -201,7 +203,7 @@ public class BlockFire extends Block
|
|||
{
|
||||
int l1 = (k1 + 40 + /* worldIn.getDifficulty().getId() */ 3 * 7) / (i + 30);
|
||||
|
||||
if (flag1)
|
||||
if (cold)
|
||||
{
|
||||
l1 /= 2;
|
||||
}
|
||||
|
@ -331,7 +333,7 @@ public class BlockFire extends Block
|
|||
public void onAdded(AWorldServer worldIn, BlockPos pos, State state)
|
||||
{
|
||||
if ( // (worldIn.dimension.getDimensionId() < -1 || worldIn.dimension.getDimensionId() > 0) ||
|
||||
!Blocks.portal.tryIgnitePortal(worldIn, pos, worldIn.rand.zrange(8)))
|
||||
!BlockPortal.getByType(PortalType.values()[worldIn.rand.zrange(PortalType.values().length - 2)]).tryIgnitePortal(worldIn, pos))
|
||||
{
|
||||
if (!worldIn.isBlockSolid(pos.down()) && !this.canNeighborCatchFire(worldIn, pos))
|
||||
{
|
||||
|
@ -441,482 +443,482 @@ public class BlockFire extends Block
|
|||
private static Model fire_nsu2_flip(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.s().uv(16, 0, 0, 16).noCull().tint()
|
||||
.s().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.n().uv(16, 0, 0, 16).noCull().tint()
|
||||
.n().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.s().uv(16, 0, 0, 16).noCull().tint()
|
||||
.s().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.n().uv(16, 0, 0, 16).noCull().tint()
|
||||
.n().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 16, Facing.Axis.X, -22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(180).noCull().tint()
|
||||
.d().uv(0, 0, 16, 16).rot(180).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).noCull().tint();
|
||||
.d().uv(0, 0, 16, 16).noCull();
|
||||
}
|
||||
private static Model fire_nu1(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.s().uv(0, 0, 16, 16).noCull().tint()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.n().uv(0, 0, 16, 16).noCull().tint()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(16, 16, 8, Facing.Axis.Z, 22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(270).noCull().tint()
|
||||
.d().uv(0, 0, 16, 16).rot(270).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(90).noCull().tint();
|
||||
.d().uv(0, 0, 16, 16).rot(90).noCull();
|
||||
}
|
||||
private static Model fire_nseu2_flip(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.s().uv(16, 0, 0, 16).noCull().tint()
|
||||
.s().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.n().uv(16, 0, 0, 16).noCull().tint()
|
||||
.n().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.s().uv(16, 0, 0, 16).noCull().tint()
|
||||
.s().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.n().uv(16, 0, 0, 16).noCull().tint()
|
||||
.n().uv(16, 0, 0, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.e().uv(16, 0, 0, 16).noCull().tint()
|
||||
.e().uv(16, 0, 0, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.w().uv(16, 0, 0, 16).noCull().tint()
|
||||
.w().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 16, Facing.Axis.X, -22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(180).noCull().tint()
|
||||
.d().uv(0, 0, 16, 16).rot(180).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).noCull().tint();
|
||||
.d().uv(0, 0, 16, 16).noCull();
|
||||
}
|
||||
private static Model fire_neu1_flip(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.s().uv(16, 0, 0, 16).noCull().tint()
|
||||
.s().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.n().uv(16, 0, 0, 16).noCull().tint()
|
||||
.n().uv(16, 0, 0, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.e().uv(16, 0, 0, 16).noCull().tint()
|
||||
.e().uv(16, 0, 0, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.w().uv(16, 0, 0, 16).noCull().tint()
|
||||
.w().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(16, 16, 8, Facing.Axis.Z, 22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(270).noCull().tint()
|
||||
.d().uv(0, 0, 16, 16).rot(270).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(90).noCull().tint();
|
||||
.d().uv(0, 0, 16, 16).rot(90).noCull();
|
||||
}
|
||||
private static Model fire_nsu2(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.s().uv(0, 0, 16, 16).noCull().tint()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.n().uv(0, 0, 16, 16).noCull().tint()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.s().uv(0, 0, 16, 16).noCull().tint()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.n().uv(0, 0, 16, 16).noCull().tint()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 16, Facing.Axis.X, -22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(180).noCull().tint()
|
||||
.d().uv(0, 0, 16, 16).rot(180).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).noCull().tint();
|
||||
.d().uv(0, 0, 16, 16).noCull();
|
||||
}
|
||||
private static Model fire_nu2_flip(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.s().uv(16, 0, 0, 16).noCull().tint()
|
||||
.s().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.n().uv(16, 0, 0, 16).noCull().tint()
|
||||
.n().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 16, Facing.Axis.X, -22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(180).noCull().tint()
|
||||
.d().uv(0, 0, 16, 16).rot(180).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).noCull().tint();
|
||||
.d().uv(0, 0, 16, 16).noCull();
|
||||
}
|
||||
private static Model fire_neu2_flip(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.s().uv(16, 0, 0, 16).noCull().tint()
|
||||
.s().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.n().uv(16, 0, 0, 16).noCull().tint()
|
||||
.n().uv(16, 0, 0, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.e().uv(16, 0, 0, 16).noCull().tint()
|
||||
.e().uv(16, 0, 0, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.w().uv(16, 0, 0, 16).noCull().tint()
|
||||
.w().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 16, Facing.Axis.X, -22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(180).noCull().tint()
|
||||
.d().uv(0, 0, 16, 16).rot(180).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).noCull().tint();
|
||||
.d().uv(0, 0, 16, 16).noCull();
|
||||
}
|
||||
private static Model fire_nsewu2_flip(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.s().uv(16, 0, 0, 16).noCull().tint()
|
||||
.s().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.n().uv(16, 0, 0, 16).noCull().tint()
|
||||
.n().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.s().uv(16, 0, 0, 16).noCull().tint()
|
||||
.s().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.n().uv(16, 0, 0, 16).noCull().tint()
|
||||
.n().uv(16, 0, 0, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.e().uv(16, 0, 0, 16).noCull().tint()
|
||||
.e().uv(16, 0, 0, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.w().uv(16, 0, 0, 16).noCull().tint()
|
||||
.w().uv(16, 0, 0, 16).noCull()
|
||||
.add(0.01f, 1, 0, 0.01f, 23.4f, 16).noShade()
|
||||
.e().uv(16, 0, 0, 16).noCull().tint()
|
||||
.e().uv(16, 0, 0, 16).noCull()
|
||||
.add(15.99f, 1, 0, 0.01f, 23.4f, 16).noShade()
|
||||
.w().uv(16, 0, 0, 16).noCull().tint()
|
||||
.w().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 16, Facing.Axis.X, -22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(180).noCull().tint()
|
||||
.d().uv(0, 0, 16, 16).rot(180).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).noCull().tint();
|
||||
.d().uv(0, 0, 16, 16).noCull();
|
||||
}
|
||||
private static Model fire_nsewu2(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.s().uv(0, 0, 16, 16).noCull().tint()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.n().uv(0, 0, 16, 16).noCull().tint()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.s().uv(0, 0, 16, 16).noCull().tint()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.n().uv(0, 0, 16, 16).noCull().tint()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.e().uv(0, 0, 16, 16).noCull().tint()
|
||||
.e().uv(0, 0, 16, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.w().uv(0, 0, 16, 16).noCull().tint()
|
||||
.w().uv(0, 0, 16, 16).noCull()
|
||||
.add(0.01f, 1, 0, 0.01f, 23.4f, 16).noShade()
|
||||
.e().uv(0, 0, 16, 16).noCull().tint()
|
||||
.e().uv(0, 0, 16, 16).noCull()
|
||||
.add(15.99f, 1, 0, 0.01f, 23.4f, 16).noShade()
|
||||
.w().uv(0, 0, 16, 16).noCull().tint()
|
||||
.w().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 16, Facing.Axis.X, -22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(180).noCull().tint()
|
||||
.d().uv(0, 0, 16, 16).rot(180).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).noCull().tint();
|
||||
.d().uv(0, 0, 16, 16).noCull();
|
||||
}
|
||||
private static Model fire_nsew(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.s().uv(0, 0, 16, 16).noCull().tint()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.n().uv(0, 0, 16, 16).noCull().tint()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.s().uv(0, 0, 16, 16).noCull().tint()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.n().uv(0, 0, 16, 16).noCull().tint()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.e().uv(0, 0, 16, 16).noCull().tint()
|
||||
.e().uv(0, 0, 16, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.w().uv(0, 0, 16, 16).noCull().tint()
|
||||
.w().uv(0, 0, 16, 16).noCull()
|
||||
.add(0.01f, 1, 0, 0.01f, 23.4f, 16).noShade()
|
||||
.e().uv(0, 0, 16, 16).noCull().tint()
|
||||
.e().uv(0, 0, 16, 16).noCull()
|
||||
.add(15.99f, 1, 0, 0.01f, 23.4f, 16).noShade()
|
||||
.w().uv(0, 0, 16, 16).noCull().tint();
|
||||
.w().uv(0, 0, 16, 16).noCull();
|
||||
}
|
||||
private static Model fire_floor(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 0, 8.8f, 16, 22.4f, 8.8f).noShade().rotate(8, 8, 8, Facing.Axis.X, -22.5f, true)
|
||||
.s().uv(0, 0, 16, 16).noCull().tint()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 0, 7.2f, 16, 22.4f, 7.2f).noShade().rotate(8, 8, 8, Facing.Axis.X, 22.5f, true)
|
||||
.n().uv(0, 0, 16, 16).noCull().tint()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.add(8.8f, 0, 0, 8.8f, 22.4f, 16).noShade().rotate(8, 8, 8, Facing.Axis.Z, -22.5f, true)
|
||||
.w().uv(0, 0, 16, 16).noCull().tint()
|
||||
.w().uv(0, 0, 16, 16).noCull()
|
||||
.add(7.2f, 0, 0, 7.2f, 22.4f, 16).noShade().rotate(8, 8, 8, Facing.Axis.Z, 22.5f, true)
|
||||
.e().uv(0, 0, 16, 16).noCull().tint()
|
||||
.e().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 0, 15.99f, 16, 22.4f, 15.99f).noShade()
|
||||
.s().uv(0, 0, 16, 16).noCull().tint()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 0, 0.01f, 16, 22.4f, 0.01f).noShade()
|
||||
.n().uv(0, 0, 16, 16).noCull().tint()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.add(0.01f, 0, 0, 0.01f, 22.4f, 16).noShade()
|
||||
.w().uv(0, 0, 16, 16).noCull().tint()
|
||||
.w().uv(0, 0, 16, 16).noCull()
|
||||
.add(15.99f, 0, 0, 15.99f, 22.4f, 16).noShade()
|
||||
.e().uv(0, 0, 16, 16).noCull().tint();
|
||||
.e().uv(0, 0, 16, 16).noCull();
|
||||
}
|
||||
private static Model fire_u1(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(16, 16, 8, Facing.Axis.Z, 22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(270).noCull().tint()
|
||||
.d().uv(0, 0, 16, 16).rot(270).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(90).noCull().tint();
|
||||
.d().uv(0, 0, 16, 16).rot(90).noCull();
|
||||
}
|
||||
private static Model fire_n_flip(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.s().uv(16, 0, 0, 16).noCull().tint()
|
||||
.s().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.n().uv(16, 0, 0, 16).noCull().tint();
|
||||
.n().uv(16, 0, 0, 16).noCull();
|
||||
}
|
||||
private static Model fire_ne(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.s().uv(0, 0, 16, 16).noCull().tint()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.n().uv(0, 0, 16, 16).noCull().tint()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.e().uv(0, 0, 16, 16).noCull().tint()
|
||||
.e().uv(0, 0, 16, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.w().uv(0, 0, 16, 16).noCull().tint();
|
||||
.w().uv(0, 0, 16, 16).noCull();
|
||||
}
|
||||
private static Model fire_nsew_flip(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.s().uv(16, 0, 0, 16).noCull().tint()
|
||||
.s().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.n().uv(16, 0, 0, 16).noCull().tint()
|
||||
.n().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.s().uv(16, 0, 0, 16).noCull().tint()
|
||||
.s().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.n().uv(16, 0, 0, 16).noCull().tint()
|
||||
.n().uv(16, 0, 0, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.e().uv(16, 0, 0, 16).noCull().tint()
|
||||
.e().uv(16, 0, 0, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.w().uv(16, 0, 0, 16).noCull().tint()
|
||||
.w().uv(16, 0, 0, 16).noCull()
|
||||
.add(0.01f, 1, 0, 0.01f, 23.4f, 16).noShade()
|
||||
.e().uv(16, 0, 0, 16).noCull().tint()
|
||||
.e().uv(16, 0, 0, 16).noCull()
|
||||
.add(15.99f, 1, 0, 0.01f, 23.4f, 16).noShade()
|
||||
.w().uv(16, 0, 0, 16).noCull().tint();
|
||||
.w().uv(16, 0, 0, 16).noCull();
|
||||
}
|
||||
private static Model fire_nse(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.s().uv(0, 0, 16, 16).noCull().tint()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.n().uv(0, 0, 16, 16).noCull().tint()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.s().uv(0, 0, 16, 16).noCull().tint()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.n().uv(0, 0, 16, 16).noCull().tint()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.e().uv(0, 0, 16, 16).noCull().tint()
|
||||
.e().uv(0, 0, 16, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.w().uv(0, 0, 16, 16).noCull().tint();
|
||||
.w().uv(0, 0, 16, 16).noCull();
|
||||
}
|
||||
private static Model fire_nse_flip(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.s().uv(16, 0, 0, 16).noCull().tint()
|
||||
.s().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.n().uv(16, 0, 0, 16).noCull().tint()
|
||||
.n().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.s().uv(16, 0, 0, 16).noCull().tint()
|
||||
.s().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.n().uv(16, 0, 0, 16).noCull().tint()
|
||||
.n().uv(16, 0, 0, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.e().uv(16, 0, 0, 16).noCull().tint()
|
||||
.e().uv(16, 0, 0, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.w().uv(16, 0, 0, 16).noCull().tint();
|
||||
.w().uv(16, 0, 0, 16).noCull();
|
||||
}
|
||||
private static Model fire_nsu1_flip(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.s().uv(16, 0, 0, 16).noCull().tint()
|
||||
.s().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.n().uv(16, 0, 0, 16).noCull().tint()
|
||||
.n().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.s().uv(16, 0, 0, 16).noCull().tint()
|
||||
.s().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.n().uv(16, 0, 0, 16).noCull().tint()
|
||||
.n().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(16, 16, 8, Facing.Axis.Z, 22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(270).noCull().tint()
|
||||
.d().uv(0, 0, 16, 16).rot(270).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(90).noCull().tint();
|
||||
.d().uv(0, 0, 16, 16).rot(90).noCull();
|
||||
}
|
||||
private static Model fire_n(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.s().uv(0, 0, 16, 16).noCull().tint()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.n().uv(0, 0, 16, 16).noCull().tint();
|
||||
.n().uv(0, 0, 16, 16).noCull();
|
||||
}
|
||||
private static Model fire_ns(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.s().uv(0, 0, 16, 16).noCull().tint()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.n().uv(0, 0, 16, 16).noCull().tint()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.s().uv(0, 0, 16, 16).noCull().tint()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.n().uv(0, 0, 16, 16).noCull().tint();
|
||||
.n().uv(0, 0, 16, 16).noCull();
|
||||
}
|
||||
private static Model fire_neu1(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.s().uv(0, 0, 16, 16).noCull().tint()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.n().uv(0, 0, 16, 16).noCull().tint()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.e().uv(0, 0, 16, 16).noCull().tint()
|
||||
.e().uv(0, 0, 16, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.w().uv(0, 0, 16, 16).noCull().tint()
|
||||
.w().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(16, 16, 8, Facing.Axis.Z, 22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(270).noCull().tint()
|
||||
.d().uv(0, 0, 16, 16).rot(270).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(90).noCull().tint();
|
||||
.d().uv(0, 0, 16, 16).rot(90).noCull();
|
||||
}
|
||||
private static Model fire_u2(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 16, Facing.Axis.X, -22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(180).noCull().tint()
|
||||
.d().uv(0, 0, 16, 16).rot(180).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).noCull().tint();
|
||||
.d().uv(0, 0, 16, 16).noCull();
|
||||
}
|
||||
private static Model fire_nseu2(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.s().uv(0, 0, 16, 16).noCull().tint()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.n().uv(0, 0, 16, 16).noCull().tint()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.s().uv(0, 0, 16, 16).noCull().tint()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.n().uv(0, 0, 16, 16).noCull().tint()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.e().uv(0, 0, 16, 16).noCull().tint()
|
||||
.e().uv(0, 0, 16, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.w().uv(0, 0, 16, 16).noCull().tint()
|
||||
.w().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 16, Facing.Axis.X, -22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(180).noCull().tint()
|
||||
.d().uv(0, 0, 16, 16).rot(180).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).noCull().tint();
|
||||
.d().uv(0, 0, 16, 16).noCull();
|
||||
}
|
||||
private static Model fire_neu2(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.s().uv(0, 0, 16, 16).noCull().tint()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.n().uv(0, 0, 16, 16).noCull().tint()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.e().uv(0, 0, 16, 16).noCull().tint()
|
||||
.e().uv(0, 0, 16, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.w().uv(0, 0, 16, 16).noCull().tint()
|
||||
.w().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 16, Facing.Axis.X, -22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(180).noCull().tint()
|
||||
.d().uv(0, 0, 16, 16).rot(180).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).noCull().tint();
|
||||
.d().uv(0, 0, 16, 16).noCull();
|
||||
}
|
||||
private static Model fire_nu2(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.s().uv(0, 0, 16, 16).noCull().tint()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.n().uv(0, 0, 16, 16).noCull().tint()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 16, Facing.Axis.X, -22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(180).noCull().tint()
|
||||
.d().uv(0, 0, 16, 16).rot(180).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(8, 16, 0, Facing.Axis.X, 22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).noCull().tint();
|
||||
.d().uv(0, 0, 16, 16).noCull();
|
||||
}
|
||||
private static Model fire_nseu1(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.s().uv(0, 0, 16, 16).noCull().tint()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.n().uv(0, 0, 16, 16).noCull().tint()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.s().uv(0, 0, 16, 16).noCull().tint()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.n().uv(0, 0, 16, 16).noCull().tint()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.e().uv(0, 0, 16, 16).noCull().tint()
|
||||
.e().uv(0, 0, 16, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.w().uv(0, 0, 16, 16).noCull().tint()
|
||||
.w().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(16, 16, 8, Facing.Axis.Z, 22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(270).noCull().tint()
|
||||
.d().uv(0, 0, 16, 16).rot(270).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(90).noCull().tint();
|
||||
.d().uv(0, 0, 16, 16).rot(90).noCull();
|
||||
}
|
||||
private static Model fire_ns_flip(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.s().uv(16, 0, 0, 16).noCull().tint()
|
||||
.s().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.n().uv(16, 0, 0, 16).noCull().tint()
|
||||
.n().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.s().uv(16, 0, 0, 16).noCull().tint()
|
||||
.s().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.n().uv(16, 0, 0, 16).noCull().tint();
|
||||
.n().uv(16, 0, 0, 16).noCull();
|
||||
}
|
||||
private static Model fire_nsewu1(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.s().uv(0, 0, 16, 16).noCull().tint()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.n().uv(0, 0, 16, 16).noCull().tint()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.s().uv(0, 0, 16, 16).noCull().tint()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.n().uv(0, 0, 16, 16).noCull().tint()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.e().uv(0, 0, 16, 16).noCull().tint()
|
||||
.e().uv(0, 0, 16, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.w().uv(0, 0, 16, 16).noCull().tint()
|
||||
.w().uv(0, 0, 16, 16).noCull()
|
||||
.add(0.01f, 1, 0, 0.01f, 23.4f, 16).noShade()
|
||||
.e().uv(0, 0, 16, 16).noCull().tint()
|
||||
.e().uv(0, 0, 16, 16).noCull()
|
||||
.add(15.99f, 1, 0, 0.01f, 23.4f, 16).noShade()
|
||||
.w().uv(0, 0, 16, 16).noCull().tint()
|
||||
.w().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(16, 16, 8, Facing.Axis.Z, 22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(270).noCull().tint()
|
||||
.d().uv(0, 0, 16, 16).rot(270).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(90).noCull().tint();
|
||||
.d().uv(0, 0, 16, 16).rot(90).noCull();
|
||||
}
|
||||
private static Model fire_nsu1(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.s().uv(0, 0, 16, 16).noCull().tint()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.n().uv(0, 0, 16, 16).noCull().tint()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.s().uv(0, 0, 16, 16).noCull().tint()
|
||||
.s().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.n().uv(0, 0, 16, 16).noCull().tint()
|
||||
.n().uv(0, 0, 16, 16).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(16, 16, 8, Facing.Axis.Z, 22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(270).noCull().tint()
|
||||
.d().uv(0, 0, 16, 16).rot(270).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(90).noCull().tint();
|
||||
.d().uv(0, 0, 16, 16).rot(90).noCull();
|
||||
}
|
||||
private static Model fire_nsewu1_flip(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.s().uv(16, 0, 0, 16).noCull().tint()
|
||||
.s().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.n().uv(16, 0, 0, 16).noCull().tint()
|
||||
.n().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.s().uv(16, 0, 0, 16).noCull().tint()
|
||||
.s().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.n().uv(16, 0, 0, 16).noCull().tint()
|
||||
.n().uv(16, 0, 0, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.e().uv(16, 0, 0, 16).noCull().tint()
|
||||
.e().uv(16, 0, 0, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.w().uv(16, 0, 0, 16).noCull().tint()
|
||||
.w().uv(16, 0, 0, 16).noCull()
|
||||
.add(0.01f, 1, 0, 0.01f, 23.4f, 16).noShade()
|
||||
.e().uv(16, 0, 0, 16).noCull().tint()
|
||||
.e().uv(16, 0, 0, 16).noCull()
|
||||
.add(15.99f, 1, 0, 0.01f, 23.4f, 16).noShade()
|
||||
.w().uv(16, 0, 0, 16).noCull().tint()
|
||||
.w().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(16, 16, 8, Facing.Axis.Z, 22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(270).noCull().tint()
|
||||
.d().uv(0, 0, 16, 16).rot(270).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(90).noCull().tint();
|
||||
.d().uv(0, 0, 16, 16).rot(90).noCull();
|
||||
}
|
||||
private static Model fire_ne_flip(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.s().uv(16, 0, 0, 16).noCull().tint()
|
||||
.s().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.n().uv(16, 0, 0, 16).noCull().tint()
|
||||
.n().uv(16, 0, 0, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.e().uv(16, 0, 0, 16).noCull().tint()
|
||||
.e().uv(16, 0, 0, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.w().uv(16, 0, 0, 16).noCull().tint();
|
||||
.w().uv(16, 0, 0, 16).noCull();
|
||||
}
|
||||
private static Model fire_nseu1_flip(String fire) {
|
||||
return ModelProvider.getModelProvider().getModel(fire)
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.s().uv(16, 0, 0, 16).noCull().tint()
|
||||
.s().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 0.01f, 16, 23.4f, 0.01f).noShade()
|
||||
.n().uv(16, 0, 0, 16).noCull().tint()
|
||||
.n().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.s().uv(16, 0, 0, 16).noCull().tint()
|
||||
.s().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 1, 15.99f, 16, 23.4f, 15.99f).noShade()
|
||||
.n().uv(16, 0, 0, 16).noCull().tint()
|
||||
.n().uv(16, 0, 0, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.e().uv(16, 0, 0, 16).noCull().tint()
|
||||
.e().uv(16, 0, 0, 16).noCull()
|
||||
.add(15.99f, 1, 0, 15.99f, 23.4f, 16).noShade()
|
||||
.w().uv(16, 0, 0, 16).noCull().tint()
|
||||
.w().uv(16, 0, 0, 16).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(16, 16, 8, Facing.Axis.Z, 22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(270).noCull().tint()
|
||||
.d().uv(0, 0, 16, 16).rot(270).noCull()
|
||||
.add(0, 16, 0, 16, 16, 16).noShade().rotate(0, 16, 8, Facing.Axis.Z, -22.5f, true)
|
||||
.d().uv(0, 0, 16, 16).rot(90).noCull().tint();
|
||||
.d().uv(0, 0, 16, 16).rot(90).noCull();
|
||||
}
|
||||
protected static Model getFireModel(String tex, boolean flip, int upper, boolean n, boolean s, boolean w, boolean e) {
|
||||
if(!e && !flip && !n && !s && upper == 0 && !w)
|
||||
|
@ -1116,7 +1118,7 @@ public class BlockFire extends Block
|
|||
}
|
||||
|
||||
public Model getModel(ModelProvider provider, String name, State state) {
|
||||
return getFireModel(state.getValue(ALT) ? "fire_layer_1" : "fire_layer_0", state.getValue(FLIP), state.getValue(UPPER),
|
||||
return getFireModel(state.getValue(ALT) ? name + "_layer_1" : name + "_layer_0", state.getValue(FLIP), state.getValue(UPPER),
|
||||
state.getValue(NORTH), state.getValue(SOUTH), state.getValue(WEST), state.getValue(EAST));
|
||||
}
|
||||
|
||||
|
@ -1125,8 +1127,8 @@ public class BlockFire extends Block
|
|||
}
|
||||
|
||||
public void getAnimatedTextures(Map<String, Object> map) {
|
||||
map.put("fire_layer_0", TextureAnimation.FIRE1);
|
||||
map.put("fire_layer_1", TextureAnimation.FIRE2);
|
||||
map.put("fire_layer_0", TextureAnimation.FLAME_BASE);
|
||||
map.put("fire_layer_1", TextureAnimation.FLAME_OFFSET);
|
||||
}
|
||||
|
||||
public boolean canExtinguish() {
|
||||
|
|
|
@ -6,6 +6,7 @@ import common.init.Blocks;
|
|||
import common.init.Items;
|
||||
import common.item.CheatTab;
|
||||
import common.item.Item;
|
||||
import common.model.BlockLayer;
|
||||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.properties.Property;
|
||||
|
@ -37,10 +38,17 @@ public class BlockPodzol extends Block {
|
|||
return Items.dirt;
|
||||
}
|
||||
|
||||
public Model getModel(ModelProvider provider, String name, State state) {
|
||||
return state.getValue(SNOWY) ? provider.getModel("grass_side_snowed").add().nswe().d("dirt").u("grass_top")
|
||||
: provider.getModel("dirt_podzol_side").add().nswe().d("dirt").u("dirt_podzol_top");
|
||||
}
|
||||
public BlockLayer getRenderLayer()
|
||||
{
|
||||
return BlockLayer.CUTOUT_MIPPED;
|
||||
}
|
||||
|
||||
public Model getModel(ModelProvider provider, String name, State state) {
|
||||
if(state.getValue(SNOWY))
|
||||
return provider.getModel("dirt").add().d().u("snow").nswe().add().nswe("soil_snowed");
|
||||
else
|
||||
return provider.getModel("dirt").add().d().u("podzol_top").nswe().add().nswe("podzol_side");
|
||||
}
|
||||
|
||||
protected Property[] getUnsavedProperties() {
|
||||
return new Property[] {SNOWY};
|
||||
|
|
|
@ -10,7 +10,7 @@ import common.item.Item;
|
|||
import common.item.ItemStack;
|
||||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.properties.Property;
|
||||
import common.properties.PropertyInteger;
|
||||
import common.rng.Random;
|
||||
|
@ -37,7 +37,7 @@ public class BlockSnow extends Block
|
|||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F);
|
||||
this.setTicked();
|
||||
this.setTab(CheatTab.DECORATION);
|
||||
this.setItemBounds();
|
||||
this.getBoundsForLayers(0);
|
||||
}
|
||||
|
||||
public boolean isPassable(IBlockAccess worldIn, BlockPos pos)
|
||||
|
@ -67,14 +67,6 @@ public class BlockSnow extends Block
|
|||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the block's bounds for rendering it as an item
|
||||
*/
|
||||
public void setItemBounds()
|
||||
{
|
||||
this.getBoundsForLayers(0);
|
||||
}
|
||||
|
||||
public void setBlockBounds(IWorldAccess worldIn, BlockPos pos)
|
||||
{
|
||||
State iblockstate = worldIn.getState(pos);
|
||||
|
|
|
@ -1,14 +1,18 @@
|
|||
package common.block.natural;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import common.model.TextureAnimation;
|
||||
import common.rng.Random;
|
||||
import common.util.BlockPos;
|
||||
import common.world.World;
|
||||
|
||||
public class BlockSoulFire extends BlockTintedFire {
|
||||
public BlockSoulFire() {
|
||||
super(0x4010ff);
|
||||
}
|
||||
|
||||
public class BlockSoulFire extends BlockFire {
|
||||
public void getAnimatedTextures(Map<String, Object> map) {
|
||||
map.put("soul_fire_layer_0", TextureAnimation.BLUE_FLAME_BASE);
|
||||
map.put("soul_fire_layer_1", TextureAnimation.BLUE_FLAME_OFFSET);
|
||||
}
|
||||
|
||||
protected void catchOnFire(World world, BlockPos pos, int chance, Random rand, int age) {
|
||||
}
|
||||
|
||||
|
|
|
@ -23,9 +23,6 @@ public class BlockSoulSand extends Block
|
|||
return new BoundingBox((double)pos.getX(), (double)pos.getY(), (double)pos.getZ(), (double)(pos.getX() + 1), (double)((float)(pos.getY() + 1) - f), (double)(pos.getZ() + 1));
|
||||
}
|
||||
|
||||
/**
|
||||
* Called When an Entity Collided with the Block
|
||||
*/
|
||||
public void onCollideUpdate(World worldIn, BlockPos pos, State state, Entity entityIn)
|
||||
{
|
||||
entityIn.motionX *= 0.4D;
|
||||
|
|
|
@ -1,36 +0,0 @@
|
|||
package common.block.natural;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.TextureAnimation;
|
||||
import common.util.BlockPos;
|
||||
import common.world.IWorldAccess;
|
||||
import common.world.State;
|
||||
|
||||
public class BlockTintedFire extends BlockFire {
|
||||
private final int tint;
|
||||
|
||||
public BlockTintedFire(int tint) {
|
||||
this.tint = tint;
|
||||
}
|
||||
|
||||
public int getRenderColor(State state) {
|
||||
return this.tint;
|
||||
}
|
||||
|
||||
public int colorMultiplier(IWorldAccess worldIn, BlockPos pos, int renderPass) {
|
||||
return this.tint;
|
||||
}
|
||||
|
||||
public Model getModel(ModelProvider provider, String name, State state) {
|
||||
return getFireModel(state.getValue(ALT) ? "flame_layer_1" : "flame_layer_0", state.getValue(FLIP), state.getValue(UPPER),
|
||||
state.getValue(NORTH), state.getValue(SOUTH), state.getValue(WEST), state.getValue(EAST));
|
||||
}
|
||||
|
||||
public void getAnimatedTextures(Map<String, Object> map) {
|
||||
map.put("flame_layer_0", TextureAnimation.FLAME1);
|
||||
map.put("flame_layer_1", TextureAnimation.FLAME2);
|
||||
}
|
||||
}
|
|
@ -9,7 +9,7 @@ import common.item.Item;
|
|||
import common.model.BlockLayer;
|
||||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.rng.Random;
|
||||
import common.util.BlockPos;
|
||||
import common.util.BoundingBox;
|
||||
|
@ -72,7 +72,7 @@ public class BlockWeb extends Block
|
|||
return provider.getModel("web").cross();
|
||||
}
|
||||
|
||||
public Transform getTransform() {
|
||||
return Transform.CROSS;
|
||||
public GuiPosition getItemPosition() {
|
||||
return GuiPosition.CROSS;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -14,7 +14,7 @@ import common.item.CheatTab;
|
|||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.ModelRotation;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.properties.Property;
|
||||
import common.util.BlockPos;
|
||||
import common.util.ExtMath;
|
||||
|
@ -113,14 +113,6 @@ public class BlockAnvil extends BlockFalling implements Rotatable
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Possibly modify the given BlockState before rendering it on an Entity (Minecarts, Endermen, ...)
|
||||
*/
|
||||
public State getEntityState(State state)
|
||||
{
|
||||
return this.getState().withProperty(FACING, Facing.SOUTH);
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {FACING};
|
||||
|
|
|
@ -9,7 +9,7 @@ import common.item.CheatTab;
|
|||
import common.item.Item;
|
||||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.rng.Random;
|
||||
import common.util.BlockPos;
|
||||
import common.util.BoundingBox;
|
||||
|
@ -205,17 +205,6 @@ public abstract class BlockBasePressurePlate extends Block
|
|||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the block's bounds for rendering it as an item
|
||||
*/
|
||||
public void setItemBounds()
|
||||
{
|
||||
float f = 0.5F;
|
||||
float f1 = 0.125F;
|
||||
float f2 = 0.5F;
|
||||
this.setBlockBounds(0.0F, 0.375F, 0.0F, 1.0F, 0.625F, 1.0F);
|
||||
}
|
||||
|
||||
public int getMobilityFlag()
|
||||
{
|
||||
return 1;
|
||||
|
@ -242,8 +231,8 @@ public abstract class BlockBasePressurePlate extends Block
|
|||
.e().uv(1, 15, 15, 16).noCull();
|
||||
}
|
||||
|
||||
public Transform getTransform() {
|
||||
return Transform.SMALL_FLAT;
|
||||
public GuiPosition getItemPosition() {
|
||||
return GuiPosition.SMALL_FLAT;
|
||||
}
|
||||
|
||||
public abstract String getTexture();
|
||||
|
|
|
@ -391,16 +391,8 @@ public class BlockBrewingStand extends Block implements ITileEntityProvider
|
|||
{
|
||||
this.setBlockBounds(0.4375F, 0.0F, 0.4375F, 0.5625F, 0.875F, 0.5625F);
|
||||
super.getCollisionBoxes(worldIn, pos, state, mask, list, collidingEntity);
|
||||
this.setItemBounds();
|
||||
super.getCollisionBoxes(worldIn, pos, state, mask, list, collidingEntity);
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the block's bounds for rendering it as an item
|
||||
*/
|
||||
public void setItemBounds()
|
||||
{
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 0.125F, 1.0F);
|
||||
super.getCollisionBoxes(worldIn, pos, state, mask, list, collidingEntity);
|
||||
}
|
||||
|
||||
public boolean onUse(World worldIn, BlockPos pos, State state, EntityNPC playerIn, Facing side, float hitX, float hitY, float hitZ)
|
||||
|
|
|
@ -16,7 +16,7 @@ import common.item.Item;
|
|||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.ModelRotation;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.properties.Property;
|
||||
import common.properties.PropertyBool;
|
||||
import common.rng.Random;
|
||||
|
@ -238,17 +238,6 @@ public class BlockButton extends Block implements Directional
|
|||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the block's bounds for rendering it as an item
|
||||
*/
|
||||
public void setItemBounds()
|
||||
{
|
||||
float f = 0.1875F;
|
||||
float f1 = 0.125F;
|
||||
float f2 = 0.125F;
|
||||
this.setBlockBounds(0.5F - f, 0.5F - f1, 0.5F - f2, 0.5F + f, 0.5F + f1, 0.5F + f2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called When an Entity Collided with the Block
|
||||
*/
|
||||
|
@ -340,7 +329,7 @@ public class BlockButton extends Block implements Directional
|
|||
.rotate(getRotation(state.getValue(FACING)));
|
||||
}
|
||||
|
||||
public Transform getTransform() {
|
||||
return Transform.PANE_SIDE;
|
||||
public GuiPosition getItemPosition() {
|
||||
return GuiPosition.PANE_SIDE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -430,14 +430,6 @@ public class BlockCauldron extends Block
|
|||
super.getCollisionBoxes(worldIn, pos, state, mask, list, collidingEntity);
|
||||
this.setBlockBounds(0.0F, 0.0F, 1.0F - f, 1.0F, 1.0F, 1.0F);
|
||||
super.getCollisionBoxes(worldIn, pos, state, mask, list, collidingEntity);
|
||||
this.setItemBounds();
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the block's bounds for rendering it as an item
|
||||
*/
|
||||
public void setItemBounds()
|
||||
{
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
|
|
|
@ -159,14 +159,6 @@ public class BlockDispenser extends Block implements ITileEntityProvider, Direct
|
|||
return new Vec3(d0, d1, d2);
|
||||
}
|
||||
|
||||
/**
|
||||
* Possibly modify the given BlockState before rendering it on an Entity (Minecarts, Endermen, ...)
|
||||
*/
|
||||
public State getEntityState(State state)
|
||||
{
|
||||
return this.getState().withProperty(FACING, Facing.SOUTH);
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {FACING};
|
||||
|
|
|
@ -13,7 +13,7 @@ import common.item.CheatTab;
|
|||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.ModelRotation;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.properties.Property;
|
||||
import common.util.BlockPos;
|
||||
import common.util.BoundingBox;
|
||||
|
@ -119,8 +119,8 @@ public abstract class BlockDisplay extends Block implements Rotatable
|
|||
return provider.getModel("iron_block").add(0, 0, 15, 16, 16, 16).n("display_area").noCull().s().du().we().rotate(ModelRotation.getNorthRot(state.getValue(FACING)));
|
||||
}
|
||||
|
||||
public Transform getTransform() {
|
||||
return Transform.PANE_SIDE;
|
||||
public GuiPosition getItemPosition() {
|
||||
return GuiPosition.PANE_SIDE;
|
||||
}
|
||||
|
||||
protected abstract BlockDisplay getOtherBlock();
|
||||
|
|
|
@ -192,14 +192,6 @@ public class BlockFurnace extends Block implements ITileEntityProvider, Rotatabl
|
|||
return Items.furnace;
|
||||
}
|
||||
|
||||
/**
|
||||
* Possibly modify the given BlockState before rendering it on an Entity (Minecarts, Endermen, ...)
|
||||
*/
|
||||
public State getEntityState(State state)
|
||||
{
|
||||
return this.getState().withProperty(FACING, Facing.SOUTH);
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {FACING};
|
||||
|
|
|
@ -10,7 +10,7 @@ import common.item.Item;
|
|||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.ModelRotation;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.properties.Property;
|
||||
import common.properties.PropertyBool;
|
||||
import common.properties.PropertyEnum;
|
||||
|
@ -289,8 +289,8 @@ public class BlockLever extends Block
|
|||
.rotate(getRotation(state.getValue(FACING)));
|
||||
}
|
||||
|
||||
public Transform getTransform() {
|
||||
return Transform.PANE_SIDE;
|
||||
public GuiPosition getItemPosition() {
|
||||
return GuiPosition.PANE_SIDE;
|
||||
}
|
||||
|
||||
public static enum EnumOrientation implements Identifyable, DirectionVec<EnumOrientation>
|
||||
|
|
|
@ -423,14 +423,6 @@ public class BlockPistonBase extends Block implements Directional
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the block's bounds for rendering it as an item
|
||||
*/
|
||||
public void setItemBounds()
|
||||
{
|
||||
this.setBlockBounds(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add all collision boxes of this Block to the list that intersect with the given mask.
|
||||
*/
|
||||
|
@ -646,14 +638,6 @@ public class BlockPistonBase extends Block implements Directional
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Possibly modify the given BlockState before rendering it on an Entity (Minecarts, Endermen, ...)
|
||||
*/
|
||||
public State getEntityState(State state)
|
||||
{
|
||||
return this.getState().withProperty(FACING, Facing.UP);
|
||||
}
|
||||
|
||||
protected Property[] getProperties()
|
||||
{
|
||||
return new Property[] {FACING, EXTENDED};
|
||||
|
|
|
@ -11,7 +11,7 @@ import common.model.BlockLayer;
|
|||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.ModelRotation;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.properties.Property;
|
||||
import common.properties.PropertyEnum;
|
||||
import common.util.BlockPos;
|
||||
|
@ -215,8 +215,8 @@ public class BlockRail extends Block
|
|||
}
|
||||
}
|
||||
|
||||
public Transform getTransform() {
|
||||
return Transform.SMALL_FLAT;
|
||||
public GuiPosition getItemPosition() {
|
||||
return GuiPosition.SMALL_FLAT;
|
||||
}
|
||||
|
||||
protected void onNeighborChangedInternal(World worldIn, BlockPos pos, State state, Block neighborBlock)
|
||||
|
|
|
@ -13,7 +13,7 @@ import common.model.BlockLayer;
|
|||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.ModelRotation;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.properties.Property;
|
||||
import common.util.BlockPos;
|
||||
import common.util.BoundingBox;
|
||||
|
@ -260,7 +260,7 @@ public abstract class BlockTorch extends Block implements Directional
|
|||
.rotate(ModelRotation.getEastRot(state.getValue(FACING), false));
|
||||
}
|
||||
|
||||
public Transform getTransform() {
|
||||
return Transform.SMALL;
|
||||
public GuiPosition getItemPosition() {
|
||||
return GuiPosition.SMALL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ import common.model.BlockLayer;
|
|||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.ModelRotation;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.properties.Property;
|
||||
import common.properties.PropertyBool;
|
||||
import common.rng.Random;
|
||||
|
@ -649,7 +649,7 @@ public class BlockTripWire extends Block
|
|||
return new Property[] {NORTH, SOUTH, WEST, EAST};
|
||||
}
|
||||
|
||||
public Transform getTransform() {
|
||||
return Transform.THIN_WIRE;
|
||||
public GuiPosition getItemPosition() {
|
||||
return GuiPosition.THIN_WIRE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ import common.model.BlockLayer;
|
|||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.ModelRotation;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.properties.Property;
|
||||
import common.properties.PropertyBool;
|
||||
import common.rng.Random;
|
||||
|
@ -547,8 +547,8 @@ public class BlockTripWireHook extends Block implements Rotatable
|
|||
return model.rotate(ModelRotation.getNorthRot(state.getValue(FACING)));
|
||||
}
|
||||
|
||||
public Transform getTransform() {
|
||||
return Transform.PANE_SIDE;
|
||||
public GuiPosition getItemPosition() {
|
||||
return GuiPosition.PANE_SIDE;
|
||||
}
|
||||
|
||||
protected Property[] getUnsavedProperties() {
|
||||
|
|
|
@ -13,7 +13,7 @@ import common.model.BlockLayer;
|
|||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.ModelRotation;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.properties.Property;
|
||||
import common.properties.PropertyBool;
|
||||
import common.rng.Random;
|
||||
|
@ -543,7 +543,7 @@ public class BlockWire extends Block
|
|||
return new Property[] {DOWN, UP, EAST, NORTH, SOUTH, WEST};
|
||||
}
|
||||
|
||||
public Transform getTransform() {
|
||||
return Transform.WIRE;
|
||||
public GuiPosition getItemPosition() {
|
||||
return GuiPosition.WIRE;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,91 +0,0 @@
|
|||
package common.color;
|
||||
|
||||
import common.biome.Biome;
|
||||
import common.util.BlockPos;
|
||||
import common.world.IWorldAccess;
|
||||
|
||||
public enum Colorizer {
|
||||
NONE(0xffffff), BASIC(0x37b500), PINE(0x3f993f), BIRCH(0x68a723);
|
||||
|
||||
private interface ColorResolver {
|
||||
int getColorAtPos(Biome biome, BlockPos pos);
|
||||
}
|
||||
|
||||
private static final ColorResolver GRASS_COLOR = new ColorResolver() {
|
||||
public int getColorAtPos(Biome biome, BlockPos pos) {
|
||||
return biome.getGrassColorAtPos(pos);
|
||||
}
|
||||
};
|
||||
private static final ColorResolver FOLIAGE_COLOR = new ColorResolver() {
|
||||
public int getColorAtPos(Biome biome, BlockPos pos) {
|
||||
return biome.getFoliageColorAtPos(pos);
|
||||
}
|
||||
};
|
||||
private static final ColorResolver WATER_COLOR_MULTIPLIER = new ColorResolver() {
|
||||
public int getColorAtPos(Biome biome, BlockPos pos) {
|
||||
return biome.waterColor;
|
||||
}
|
||||
};
|
||||
private static final int[] GRASS = new int[65536];
|
||||
private static final int[] FOLIAGE = new int[65536];
|
||||
|
||||
private final int color;
|
||||
|
||||
public static int[] getGrassMap() {
|
||||
return GRASS;
|
||||
}
|
||||
|
||||
public static int[] getFoliageMap() {
|
||||
return FOLIAGE;
|
||||
}
|
||||
|
||||
public static int getGrassColor(double temp, double rain) {
|
||||
rain = rain * temp;
|
||||
int i = (int)((1.0D - temp) * 255.0D);
|
||||
int j = (int)((1.0D - rain) * 255.0D);
|
||||
int k = j << 8 | i;
|
||||
return k > GRASS.length ? 0xFFFF00FF : GRASS[k];
|
||||
}
|
||||
|
||||
public static int getFoliageColor(double temp, double rain) {
|
||||
rain = rain * temp;
|
||||
int i = (int)((1.0D - temp) * 255.0D);
|
||||
int j = (int)((1.0D - rain) * 255.0D);
|
||||
return FOLIAGE[j << 8 | i];
|
||||
}
|
||||
|
||||
private static int getColor(IWorldAccess access, BlockPos pos, ColorResolver resolver) {
|
||||
int r = 0;
|
||||
int g = 0;
|
||||
int b = 0;
|
||||
|
||||
for(BlockPos.MutableBlockPos loc : BlockPos.getAllInBoxMutable(pos.add(-1, 0, -1), pos.add(1, 0, 1))) {
|
||||
int c = resolver.getColorAtPos(access.getBiomeGenForCoords(loc), loc);
|
||||
r += (c & 16711680) >> 16;
|
||||
g += (c & 65280) >> 8;
|
||||
b += c & 255;
|
||||
}
|
||||
|
||||
return (r / 9 & 255) << 16 | (g / 9 & 255) << 8 | b / 9 & 255;
|
||||
}
|
||||
|
||||
public static int getGrassColor(IWorldAccess access, BlockPos pos) {
|
||||
return getColor(access, pos, GRASS_COLOR);
|
||||
}
|
||||
|
||||
public static int getFoliageColor(IWorldAccess access, BlockPos pos) {
|
||||
return getColor(access, pos, FOLIAGE_COLOR);
|
||||
}
|
||||
|
||||
public static int getWaterColor(IWorldAccess access, BlockPos pos) {
|
||||
return getColor(access, pos, WATER_COLOR_MULTIPLIER);
|
||||
}
|
||||
|
||||
private Colorizer(int color) {
|
||||
this.color = color;
|
||||
}
|
||||
|
||||
public int getColor() {
|
||||
return this.color;
|
||||
}
|
||||
}
|
|
@ -1923,50 +1923,11 @@ public abstract class Entity
|
|||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Marks the entity as being inside a portal, activating teleportation logic in onEntityUpdate() in the following
|
||||
* tick(s).
|
||||
*
|
||||
* @param pos The postion of the portal that the entity is in
|
||||
*/
|
||||
public void setPortal(int dim)
|
||||
public void setPortal(PortalType dim)
|
||||
{
|
||||
// if (this.portalTimer > 0)
|
||||
// {
|
||||
// this.portalTimer = this.getPortalCooldown();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// if (!this.worldObj.client && !pos.equals(this.portalPos))
|
||||
// {
|
||||
// this.portalPos = pos;
|
||||
// BlockPattern.PatternHelper blockpattern$patternhelper = Blocks.portal.func_181089_f(this.worldObj, pos);
|
||||
// double d0 = blockpattern$patternhelper.getFinger().getAxis() == EnumFacing.Axis.X ? (double)blockpattern$patternhelper.getPos().getZ() : (double)blockpattern$patternhelper.getPos().getX();
|
||||
// double d1 = blockpattern$patternhelper.getFinger().getAxis() == EnumFacing.Axis.X ? this.posZ : this.posX;
|
||||
// d1 = Math.abs(MathHelper.func_181160_c(d1 - (double)(blockpattern$patternhelper.getFinger().rotateY().getAxisDirection() == EnumFacing.AxisDirection.NEGATIVE ? 1 : 0), d0, d0 - (double)blockpattern$patternhelper.getPalmLength()));
|
||||
// double d2 = MathHelper.func_181160_c(this.posY - 1.0D, (double)blockpattern$patternhelper.getPos().getY(), (double)(blockpattern$patternhelper.getPos().getY() - blockpattern$patternhelper.getThumbLength()));
|
||||
// this.portalVec = new Vec3(d1, d2, 0.0D);
|
||||
// this.portalDir = blockpattern$patternhelper.getFinger();
|
||||
// }
|
||||
//
|
||||
if(!this.worldObj.client)
|
||||
this.unmount();
|
||||
this.inPortal = PortalType.values()[dim];
|
||||
// }
|
||||
}
|
||||
|
||||
public void setFlatPortal()
|
||||
{
|
||||
// if (this.portalTimer > 0)
|
||||
// {
|
||||
// this.portalTimer = this.getPortalCooldown();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
if(!this.worldObj.client)
|
||||
this.unmount();
|
||||
this.inPortal = PortalType.FLOOR;
|
||||
// }
|
||||
this.inPortal = dim;
|
||||
}
|
||||
|
||||
public void unmount()
|
||||
|
|
|
@ -288,7 +288,7 @@ public class EntitySheep extends EntityAnimal
|
|||
|
||||
public static DyeColor getRandomSheepColor(Random random, Biome biome)
|
||||
{
|
||||
if(biome == Biome.SNOWLAND)
|
||||
if(biome == Biome.SNOW)
|
||||
return DyeColor.WHITE;
|
||||
int i = random.zrange(140);
|
||||
return i < 20 ? DyeColor.BLACK :
|
||||
|
|
|
@ -385,7 +385,7 @@ public class EntitySlime extends EntityNPC
|
|||
// {
|
||||
Biome biomegenbase = this.worldObj.getBiomeGenForCoords(blockpos);
|
||||
|
||||
if (biomegenbase == Biome.SWAMPLAND && this.posY > 50.0D && this.posY < 70.0D && this.rand.floatv() < 0.5F && this.rand.floatv() < this.worldObj.getMoonPhase() && this.worldObj.getLightFromNeighbors(new BlockPos(this)) <= this.rand.zrange(8))
|
||||
if (biomegenbase == Biome.SWAMP && this.posY > 50.0D && this.posY < 70.0D && this.rand.floatv() < 0.5F && this.rand.floatv() < this.worldObj.getMoonPhase() && this.worldObj.getLightFromNeighbors(new BlockPos(this)) <= this.rand.zrange(8))
|
||||
{
|
||||
return super.getCanSpawnHere();
|
||||
}
|
||||
|
|
|
@ -14,6 +14,7 @@ import common.util.BoundingBox;
|
|||
import common.util.ExtMath;
|
||||
import common.util.HitPosition;
|
||||
import common.util.ParticleType;
|
||||
import common.util.PortalType;
|
||||
import common.util.Vec3;
|
||||
import common.world.State;
|
||||
import common.world.World;
|
||||
|
@ -224,13 +225,13 @@ public abstract class EntityThrowable extends Entity implements IProjectile
|
|||
if (movingobjectposition != null)
|
||||
{
|
||||
State state;
|
||||
if (movingobjectposition.type == HitPosition.ObjectType.BLOCK && (state = this.worldObj.getState(movingobjectposition.block)).getBlock() == Blocks.portal)
|
||||
if (movingobjectposition.type == HitPosition.ObjectType.BLOCK && (state = this.worldObj.getState(movingobjectposition.block)).getBlock() instanceof BlockPortal portal)
|
||||
{
|
||||
this.setPortal(state.getValue(BlockPortal.DIM));
|
||||
this.setPortal(portal.getType());
|
||||
}
|
||||
else if (movingobjectposition.type == HitPosition.ObjectType.BLOCK && this.worldObj.getState(movingobjectposition.block).getBlock() == Blocks.floor_portal)
|
||||
{
|
||||
this.setFlatPortal();
|
||||
this.setPortal(PortalType.FLOOR);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -58,6 +58,7 @@ import common.block.foliage.BlockPumpkin;
|
|||
import common.block.foliage.BlockReed;
|
||||
import common.block.foliage.BlockSapling;
|
||||
import common.block.foliage.BlockStem;
|
||||
import common.block.foliage.BlockSwamp;
|
||||
import common.block.foliage.BlockTallGrass;
|
||||
import common.block.foliage.BlockTianSoil;
|
||||
import common.block.foliage.BlockVine;
|
||||
|
@ -88,7 +89,7 @@ import common.block.natural.BlockSnowBlock;
|
|||
import common.block.natural.BlockSoulFire;
|
||||
import common.block.natural.BlockSoulSand;
|
||||
import common.block.natural.BlockStone;
|
||||
import common.block.natural.BlockTintedFire;
|
||||
import common.block.natural.BlockBlackFire;
|
||||
import common.block.natural.BlockWeb;
|
||||
import common.block.tech.BlockActiveDisplay;
|
||||
import common.block.tech.BlockAnvil;
|
||||
|
@ -133,6 +134,7 @@ import common.item.CheatTab;
|
|||
import common.log.Log;
|
||||
import common.model.TextureAnimation;
|
||||
import common.properties.Property;
|
||||
import common.util.PortalType;
|
||||
import common.util.Util;
|
||||
import common.world.State;
|
||||
|
||||
|
@ -287,9 +289,9 @@ public abstract class BlockRegistry {
|
|||
.setDisplay("Schwarzbruchstein").setTab(CheatTab.ROCK));
|
||||
|
||||
|
||||
registerFluid("water", "Wasser", true, LiquidType.WATER, false, 0, 5, 0.0f, TextureAnimation.WATER, TextureAnimation.WATERFLOW);
|
||||
registerFluid("water", "Wasser", true, LiquidType.WATER, false, 0, 5, 0.0f, TextureAnimation.WATER_STILL, TextureAnimation.WATER_FLOW);
|
||||
registerFluid("lava", "Lava", false, LiquidType.LAVA, true, 15, -30, 0.0f, 2, 3);
|
||||
registerFluid("magma", "Magma", false, LiquidType.HOT, true, 15, 40, 0.0f, TextureAnimation.LAVA, TextureAnimation.LAVAFLOW);
|
||||
registerFluid("magma", "Magma", false, LiquidType.HOT, true, 15, 40, 0.0f, TextureAnimation.MAGMA_STILL, TextureAnimation.MAGMA_FLOW);
|
||||
registerFluid("plasma", "Plasma", false, LiquidType.HOT, false, 15, 15, 0.0f, 2, 2);
|
||||
registerFluid("mercury", "Quecksilber", false, LiquidType.COLD, true, 0, 40, 0.0f, 8, 4);
|
||||
registerFluid("hydrogen", "Wasserstoff", false, LiquidType.COLD, true, 0, 50, 0.0f, 8, 4);
|
||||
|
@ -298,7 +300,8 @@ public abstract class BlockRegistry {
|
|||
registerFluid("goo", "Klebrige Masse", false, LiquidType.COLD, true, 0, 60, 0.0f, 10, 5);
|
||||
registerFluid("nukage", "Radioaktive Masse", false, LiquidType.COLD, true, 10, 10, 4.0f, 2, 2);
|
||||
registerFluid("blood", "Blut", false, LiquidType.COLD, false, 0, 10, 0.0f, 2, 1);
|
||||
registerFluid("springwater", "Klares Wasser", true, LiquidType.COLD, false, 0, 5, 0.0f, 1, 1);
|
||||
registerFluid("spring_water", "Klares Wasser", true, LiquidType.COLD, false, 0, 5, 0.0f, 1, 1);
|
||||
registerFluid("swamp_water", "Sumpfwasser", true, LiquidType.COLD, false, 0, 5, 0.0f, TextureAnimation.SWAMP_WATER_STILL, TextureAnimation.SWAMP_WATER_FLOW);
|
||||
|
||||
|
||||
register("coal_ore", (new BlockOre()).setHardness(3.0F).setResistance(5.0F).setSound(SoundType.STONE).setDisplay("Steinkohle"));
|
||||
|
@ -341,6 +344,7 @@ public abstract class BlockRegistry {
|
|||
register("slime_block", (new BlockSlime()).setDisplay("Schleimblock").setSound(SoundType.SLIME));
|
||||
register("blackened_dirt", (new BlockBlackenedDirt()).setHardness(0.5F).setSound(SoundType.GRAVEL).setDisplay("Schwarzerde").setShovelHarvestable());
|
||||
register("blackened_soil", (new BlockBlackenedSoil()).setHardness(0.6F).setSound(SoundType.GRASS).setDisplay("Schwarzgrund").setShovelHarvestable());
|
||||
register("swamp", (new BlockSwamp()).setHardness(0.6F).setSound(SoundType.GRASS).setDisplay("Sumpf").setShovelHarvestable());
|
||||
|
||||
|
||||
|
||||
|
@ -358,7 +362,8 @@ public abstract class BlockRegistry {
|
|||
Block cactus = (new BlockCactus()).setHardness(0.4F).setSound(SoundType.CLOTH).setDisplay("Kaktus");
|
||||
register("cactus", cactus);
|
||||
register("reeds", (new BlockReed()).setHardness(0.0F).setSound(SoundType.GRASS).setDisplay("Zuckerrohr").setTab(CheatTab.PLANTS));
|
||||
register("vine", (new BlockVine()).setHardness(0.2F).setSound(SoundType.GRASS).setDisplay("Ranken").setShearsEfficiency(0));
|
||||
register("vine", (new BlockVine(false)).setHardness(0.2F).setSound(SoundType.GRASS).setDisplay("Ranken").setShearsEfficiency(0));
|
||||
register("swamp_vine", (new BlockVine(true)).setHardness(0.2F).setSound(SoundType.GRASS).setDisplay("Sumpfranken").setShearsEfficiency(0));
|
||||
register("waterlily", (new BlockLilyPad()).setHardness(0.0F).setSound(SoundType.GRASS).setDisplay("Seerosenblatt"));
|
||||
|
||||
|
||||
|
@ -394,7 +399,7 @@ public abstract class BlockRegistry {
|
|||
}
|
||||
|
||||
register("soul_fire", (new BlockSoulFire()).setHardness(0.0F).setLight(1.0F).setSound(SoundType.CLOTH).setDisplay("Feuer der Seelen"));
|
||||
register("black_fire", (new BlockTintedFire(0x202020)).setHardness(0.0F).setLight(1.0F).setSound(SoundType.CLOTH).setDisplay("Dunkles Feuer"));
|
||||
register("black_fire", (new BlockBlackFire()).setHardness(0.0F).setLight(1.0F).setSound(SoundType.CLOTH).setDisplay("Dunkles Feuer"));
|
||||
register("web", (new BlockWeb()).setOpacity(1).setHardness(4.0F).setDisplay("Spinnennetz"));
|
||||
register("fire", (new BlockFire()).setHardness(0.0F).setLight(1.0F).setSound(SoundType.CLOTH).setDisplay("Feuer"));
|
||||
|
||||
|
@ -453,8 +458,11 @@ public abstract class BlockRegistry {
|
|||
"x" + (density * 16) + ")"));
|
||||
}
|
||||
|
||||
register("portal", (new BlockPortal()).setHardness(0.0F).setSound(SoundType.GLASS).setLight(0.75F).setDisplay("Portal"));
|
||||
register("floor_portal", (new BlockFloorPortal(Material.PORTAL)).setHardness(0.0F).setDisplay("Portal"));
|
||||
for(PortalType portal : PortalType.values()) {
|
||||
if(portal != PortalType.FLOOR && portal != PortalType.VOID)
|
||||
register(portal.getName() + "_portal", (new BlockPortal(portal)).setHardness(0.0F).setSound(SoundType.GLASS).setLight(0.75F).setDisplay(portal.getDisplay()));
|
||||
}
|
||||
register(PortalType.FLOOR.getName() + "_portal", (new BlockFloorPortal(Material.PORTAL)).setHardness(0.0F).setDisplay(PortalType.FLOOR.getDisplay()));
|
||||
register("portal_frame", (new BlockPortalFrame()).setSound(SoundType.GLASS).setLight(0.125F).setHardness(5.0F)
|
||||
.setDisplay("Portalrahmen").setResistance(2000.0F).setTab(CheatTab.TECHNOLOGY));
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ public abstract class Blocks {
|
|||
public static final BlockStairs black_brick_stairs = get("black_brick_stairs");
|
||||
public static final BlockCarpet black_carpet = get("black_carpet");
|
||||
public static final BlockColoredClay black_clay = get("black_clay");
|
||||
public static final BlockTintedFire black_fire = get("black_fire");
|
||||
public static final BlockBlackFire black_fire = get("black_fire");
|
||||
public static final BlockStainedGlass black_glass = get("black_glass");
|
||||
public static final BlockStainedGlassPane black_glass_pane = get("black_glass_pane");
|
||||
public static final BlockFlower black_lotus = get("black_lotus");
|
||||
|
@ -232,7 +232,7 @@ public abstract class Blocks {
|
|||
public static final BlockDynamicLiquid flowing_mercury = get("flowing_mercury");
|
||||
public static final BlockDynamicLiquid flowing_nukage = get("flowing_nukage");
|
||||
public static final BlockDynamicLiquid flowing_slime = get("flowing_slime");
|
||||
public static final BlockDynamicLiquid flowing_springwater = get("flowing_springwater");
|
||||
public static final BlockDynamicLiquid flowing_spring_water = get("flowing_spring_water");
|
||||
public static final BlockDynamicLiquid flowing_water = get("flowing_water");
|
||||
public static final BlockFurnace furnace = get("furnace");
|
||||
public static final BlockGlass glass = get("glass");
|
||||
|
@ -391,7 +391,6 @@ public abstract class Blocks {
|
|||
public static final BlockMetalOre plutonium_ore = get("plutonium_ore");
|
||||
public static final BlockPodzol podzol = get("podzol");
|
||||
public static final BlockFlower poppy = get("poppy");
|
||||
public static final BlockPortal portal = get("portal");
|
||||
public static final BlockPortalFrame portal_frame = get("portal_frame");
|
||||
public static final BlockMetalBlock potassium_block = get("potassium_block");
|
||||
public static final BlockMetalOre potassium_ore = get("potassium_ore");
|
||||
|
@ -463,7 +462,7 @@ public abstract class Blocks {
|
|||
public static final BlockSoulSand soul_sand = get("soul_sand");
|
||||
public static final BlockWart soul_warts = get("soul_warts");
|
||||
public static final Block sponge = get("sponge");
|
||||
public static final BlockStaticLiquid springwater = get("springwater");
|
||||
public static final BlockStaticLiquid spring_water = get("spring_water");
|
||||
public static final BlockDoor spruce_door = get("spruce_door");
|
||||
public static final BlockFence spruce_fence = get("spruce_fence");
|
||||
public static final BlockFenceGate spruce_fence_gate = get("spruce_fence_gate");
|
||||
|
@ -591,6 +590,32 @@ public abstract class Blocks {
|
|||
public static final BlockWire wire = get("wire");
|
||||
public static final BlockStaticLiquid plasma = get("plasma");
|
||||
public static final BlockDynamicLiquid flowing_plasma = get("flowing_plasma");
|
||||
public static final BlockStaticLiquid swamp_water = get("swamp_water");
|
||||
public static final BlockDynamicLiquid flowing_swamp_water = get("flowing_swamp_water");
|
||||
public static final BlockDoor swamp_oak_door = get("swamp_oak_door");
|
||||
public static final BlockFence swamp_oak_fence = get("swamp_oak_fence");
|
||||
public static final BlockFenceGate swamp_oak_fence_gate = get("swamp_oak_fence_gate");
|
||||
public static final BlockLeaves swamp_oak_leaves_autumn = get("swamp_oak_leaves_autumn");
|
||||
public static final BlockLeaves swamp_oak_leaves_snowy = get("swamp_oak_leaves_snowy");
|
||||
public static final BlockLeaves swamp_oak_leaves_spring = get("swamp_oak_leaves_spring");
|
||||
public static final BlockLeaves swamp_oak_leaves_summer = get("swamp_oak_leaves_summer");
|
||||
public static final BlockLeaves swamp_oak_leaves_winter = get("swamp_oak_leaves_winter");
|
||||
public static final BlockLog swamp_oak_log = get("swamp_oak_log");
|
||||
public static final Block swamp_oak_planks = get("swamp_oak_planks");
|
||||
public static final BlockSapling swamp_oak_sapling = get("swamp_oak_sapling");
|
||||
public static final BlockSlab swamp_oak_slab = get("swamp_oak_slab");
|
||||
public static final BlockStairs swamp_oak_stairs = get("swamp_oak_stairs");
|
||||
public static final BlockTallGrass swamp_grass = get("swamp_grass");
|
||||
public static final BlockVine swamp_vine = get("swamp_vine");
|
||||
public static final BlockSwamp swamp = get("swamp");
|
||||
public static final BlockPortal arcane_portal = get("arcane_portal");
|
||||
public static final BlockPortal chaos_portal = get("chaos_portal");
|
||||
public static final BlockPortal crimson_portal = get("crimson_portal");
|
||||
public static final BlockPortal dark_portal = get("dark_portal");
|
||||
public static final BlockPortal deep_portal = get("deep_portal");
|
||||
public static final BlockPortal light_portal = get("light_portal");
|
||||
public static final BlockPortal radiating_portal = get("radiating_portal");
|
||||
public static final BlockPortal shining_portal = get("shining_portal");
|
||||
|
||||
private static <T extends Block> T get(String id) {
|
||||
T block = (T)BlockRegistry.byNameExact(id);
|
||||
|
|
|
@ -150,7 +150,9 @@ public abstract class CraftingRegistry
|
|||
add(new ItemStack(Items.quartz_pillar, 2), "#", "#", '#', Items.quartz_block);
|
||||
add(new ItemStack(Items.stonebrick, 4), "##", "##", '#', Items.stone);
|
||||
addShapeless(new ItemStack(Items.mossy_stonebrick), Items.stonebrick, Items.vine);
|
||||
addShapeless(new ItemStack(Items.mossy_stonebrick), Items.stonebrick, Items.swamp_vine);
|
||||
addShapeless(new ItemStack(Items.mossy_cobblestone), Items.cobblestone, Items.vine);
|
||||
addShapeless(new ItemStack(Items.mossy_cobblestone), Items.cobblestone, Items.swamp_vine);
|
||||
add(new ItemStack(Items.iron_bars, 16), "###", "###", '#', Items.iron_ingot);
|
||||
add(new ItemStack(Items.glass_pane, 16), "###", "###", '#', Items.glass);
|
||||
add(new ItemStack(Items.lamp, 1), " R ", "RGR", " R ", 'R', Items.charged_powder, 'G', Items.glowstone);
|
||||
|
|
|
@ -651,7 +651,7 @@ public abstract class Items {
|
|||
public static final ItemBucket recursive_mercury_bucket = get("recursive_mercury_bucket");
|
||||
public static final ItemBucket recursive_nukage_bucket = get("recursive_nukage_bucket");
|
||||
public static final ItemBucket recursive_slime_bucket = get("recursive_slime_bucket");
|
||||
public static final ItemBucket recursive_springwater_bucket = get("recursive_springwater_bucket");
|
||||
public static final ItemBucket recursive_spring_water_bucket = get("recursive_spring_water_bucket");
|
||||
public static final ItemBucket recursive_water_bucket = get("recursive_water_bucket");
|
||||
public static final Item red_bed = get("red_bed");
|
||||
public static final Item red_button = get("red_button");
|
||||
|
@ -711,7 +711,7 @@ public abstract class Items {
|
|||
public static final Item speckled_melon = get("speckled_melon");
|
||||
public static final ItemFood spider_eye = get("spider_eye");
|
||||
public static final Item sponge = get("sponge");
|
||||
public static final ItemBucket springwater_bucket = get("springwater_bucket");
|
||||
public static final ItemBucket spring_water_bucket = get("spring_water_bucket");
|
||||
public static final Item spruce_door = get("spruce_door");
|
||||
public static final Item spruce_fence = get("spruce_fence");
|
||||
public static final Item spruce_fence_gate = get("spruce_fence_gate");
|
||||
|
@ -991,6 +991,24 @@ public abstract class Items {
|
|||
public static final Item tian_torch = get("tian_torch");
|
||||
public static final ItemBucket plasma_bucket = get("plasma_bucket");
|
||||
public static final ItemBucket recursive_plasma_bucket = get("recursive_plasma_bucket");
|
||||
public static final ItemBucket swamp_water_bucket = get("swamp_water_bucket");
|
||||
public static final ItemBucket recursive_swamp_water_bucket = get("recursive_swamp_water_bucket");
|
||||
public static final Item swamp_grass = get("swamp_grass");
|
||||
public static final Item swamp_oak_door = get("swamp_oak_door");
|
||||
public static final Item swamp_oak_fence = get("swamp_oak_fence");
|
||||
public static final Item swamp_oak_fence_gate = get("swamp_oak_fence_gate");
|
||||
public static final Item swamp_oak_leaves_autumn = get("swamp_oak_leaves_autumn");
|
||||
public static final Item swamp_oak_leaves_snowy = get("swamp_oak_leaves_snowy");
|
||||
public static final Item swamp_oak_leaves_spring = get("swamp_oak_leaves_spring");
|
||||
public static final Item swamp_oak_leaves_summer = get("swamp_oak_leaves_summer");
|
||||
public static final Item swamp_oak_leaves_winter = get("swamp_oak_leaves_winter");
|
||||
public static final Item swamp_oak_log = get("swamp_oak_log");
|
||||
public static final Item swamp_oak_planks = get("swamp_oak_planks");
|
||||
public static final Item swamp_oak_sapling = get("swamp_oak_sapling");
|
||||
public static final Item swamp_oak_slab = get("swamp_oak_slab");
|
||||
public static final Item swamp_oak_stairs = get("swamp_oak_stairs");
|
||||
public static final Item swamp_vine = get("swamp_vine");
|
||||
public static final Item swamp = get("swamp");
|
||||
|
||||
private static <T extends Item> T get(String id) {
|
||||
T item = (T)ItemRegistry.byName(id);
|
||||
|
|
|
@ -406,12 +406,12 @@ public abstract class UniverseRegistry {
|
|||
registerPlanet("Terra", new Planet(6378136, 8766144L, 24000L, 28.0f, 9.81f, 259.15f)
|
||||
.setPerlinGen(Blocks.stone.getState(), Blocks.water.getState(), 63)
|
||||
.setBiomeReplacer(Blocks.gravel.getState())
|
||||
.setBiomeGen(Biome.FOREST, false, 4, 4, 6, 50, 50, Biome.MUSHROOMPLAINS).enableMobs().enableSnow()
|
||||
.setFrostBiomes(Biome.ICEPLAINS, Biome.ICEPLAINS, Biome.ICEPLAINS, Biome.COLDTAIGA, Biome.MEGATAIGA)
|
||||
.setColdBiomes(Biome.FOREST, Biome.EXTREMEHILLS, Biome.TAIGA, Biome.PLAINS)
|
||||
.setMediumBiomes(Biome.FOREST, Biome.ROOFEDFOREST, Biome.EXTREMEHILLS, Biome.PLAINS, Biome.BIRCHFOREST,
|
||||
Biome.SWAMPLAND, Biome.JUNGLE)
|
||||
.setHotBiomes(Biome.DESERT, Biome.DESERT, Biome.DESERT, Biome.SAVANNA, Biome.SAVANNA, Biome.PLAINS)
|
||||
.setBiomeGen(Biome.FOREST, false, 4, 4, 6, 50, 50, Biome.MUSHROOM).enableMobs().enableSnow()
|
||||
.setFrostBiomes(Biome.ICE, Biome.ICE, Biome.ICE, Biome.ICE_TAIGA, Biome.LARGE_TAIGA)
|
||||
.setColdBiomes(Biome.FOREST, Biome.HILLS, Biome.TAIGA, Biome.PLAIN)
|
||||
.setMediumBiomes(Biome.FOREST, Biome.DARK_FOREST, Biome.HILLS, Biome.PLAIN, Biome.BIRCH_FOREST,
|
||||
Biome.SWAMP, Biome.TROPIC)
|
||||
.setHotBiomes(Biome.DESERT, Biome.DESERT, Biome.DESERT, Biome.SAVANNA, Biome.SAVANNA, Biome.PLAIN)
|
||||
.enableCavesRavines(Blocks.lava.getState()).setDungeons(8)
|
||||
.addLake(Blocks.water.getState(), null, Blocks.grass.getState(), 4, 0, 255, false)
|
||||
.addLake(Blocks.lava.getState(), Blocks.stone.getState(), null, 8, 8, 255, true)
|
||||
|
@ -490,7 +490,7 @@ public abstract class UniverseRegistry {
|
|||
registerStar("Gi'rok", 603421976, 232.0f, 5220.0f, () -> {
|
||||
registerPlanet("gharoth", "Elbenplanet Gharoth", new Planet(2806382, 4837386L, 52960L, 30.0f, 10.0f, 257.3f)
|
||||
.setSimpleGen(Blocks.dirt.getState(), Blocks.water.getState(), 64)
|
||||
.setSimpleReplacer(Blocks.gravel.getState(), Blocks.sand.getState()).setBiome(Biome.ELVENFOREST)
|
||||
.setSimpleReplacer(Blocks.gravel.getState(), Blocks.sand.getState()).setBiome(Biome.ELVEN_FOREST)
|
||||
.enableCaves(Blocks.air.getState()).setDungeons(4).enableMobs().enableSnow()
|
||||
.addLake(Blocks.water.getState(), null, Blocks.grass.getState(), 4, 0, 255, false)
|
||||
.addLake(Blocks.lava.getState(), null, null, 8, 8, 255, true)
|
||||
|
@ -511,9 +511,9 @@ public abstract class UniverseRegistry {
|
|||
.addOre(Blocks.ardite_ore.getState(), 0, 2, 3, 0, 12, false)
|
||||
.addOre(Blocks.nichun_ore.getState(), 0, 10, 1, 0, 10, false), () -> {
|
||||
registerMoon("yrdinath", "Eismond Yrdinath", new Moon(0xccccff, 2503812, 46743637L, 17460L, 2.5f, 239.15f, Blocks.snow, Blocks.ice)
|
||||
.setBiome(Biome.SNOWLAND).enableMobs().enableSnow().setDefaultWeather(Weather.SNOW));
|
||||
.setBiome(Biome.SNOW).enableMobs().enableSnow().setDefaultWeather(Weather.SNOW));
|
||||
registerMoon("mythril", "Eismond Mythril", new Moon(0xbbbbff, 2213749, 42659432L, 15330L, 2.25f, 221.65f, Blocks.snow, Blocks.ice)
|
||||
.setBiome(Biome.SNOWLAND).enableMobs().enableSnow().setDefaultWeather(Weather.SNOW));
|
||||
.setBiome(Biome.SNOW).enableMobs().enableSnow().setDefaultWeather(Weather.SNOW));
|
||||
});
|
||||
registerPlanet("mesar", "Wüstenplanet Me'sar", new Planet(0xff7f3f, 0xff6022, 0xff6f00, 9823183, 56643366L, 87340L, 11.0f, 333.15f)
|
||||
.setPerlinGen(Blocks.rock.getState(), Blocks.air.getState(), 63)
|
||||
|
@ -557,10 +557,10 @@ public abstract class UniverseRegistry {
|
|||
|
||||
registerDomain("Tian'Xin", () -> {
|
||||
registerArea("Ni'enrath", new Area(0x7f00ff, 532109, 276.15f, 1).setLightColor(0x07000f).setBlockColor(0xcf6fff)
|
||||
.setPerlinGen(Blocks.tian.getState(), Blocks.springwater.getState(), 63).setBiome(Biome.TIAN)
|
||||
.setPerlinGen(Blocks.tian.getState(), Blocks.spring_water.getState(), 63).setBiome(Biome.TIAN)
|
||||
.setBiomeReplacer(Blocks.tian.getState()).enableLongCaves().enableMobs().enableSnow()
|
||||
.addLake(Blocks.springwater.getState(), Blocks.tian.getState(), Blocks.tian.getState(), 4, 0, 255, false)
|
||||
.addLiquid(Blocks.flowing_springwater.getState(), 50, 8, 255, false));
|
||||
.addLake(Blocks.spring_water.getState(), Blocks.tian.getState(), Blocks.tian.getState(), 4, 0, 255, false)
|
||||
.addLiquid(Blocks.flowing_spring_water.getState(), 50, 8, 255, false));
|
||||
});
|
||||
registerDomain("Digital", () -> {
|
||||
registerArea("Cyberspace", new Area(0x000000, 16777216, 293.15f, 15).setLightColor(0x00ff00).setBlockColor(0xff0000).enableBlockLightSubtraction()
|
||||
|
@ -572,27 +572,27 @@ public abstract class UniverseRegistry {
|
|||
.enableWorldCeiling().enableDenseFog()
|
||||
.setCavernGen(Blocks.hellrock.getState(), Blocks.lava.getState(), 63)
|
||||
.setSurfaceReplacer(Blocks.gravel.getState(), Blocks.soul_sand.getState())
|
||||
.setBiome(Biome.UPPERHELL));
|
||||
.setBiome(Biome.UPPER_HELL));
|
||||
registerArea("kyroth", "Kreis Kyroth", new Area(0x990000, 86742970, 387.15f, 3).enableLongCaves().enableMobs()
|
||||
.setSimpleGen(Blocks.hellrock.getState(), Blocks.lava.getState(), 64)
|
||||
.setSimpleReplacer(Blocks.obsidian.getState(), Blocks.soul_sand.getState())
|
||||
.setBiome(Biome.LOWERHELL)
|
||||
.setBiome(Biome.LOWER_HELL)
|
||||
.addLake(Blocks.lava.getState(), null, null, 4, 8, 255, false)
|
||||
.addLiquid(Blocks.flowing_lava.getState(), 40, 8, 255, true));
|
||||
registerArea("ahrd", "Kreis Ahrd", new Area(0xcc0000, 67028432, 467.15f, 15).enableLongCaves().enableMobs()
|
||||
.setPerlinGen(Blocks.hellrock.getState(), Blocks.lava.getState(), 63)
|
||||
.setBiomeReplacer(Blocks.soul_sand.getState()).setBiome(Biome.HELLHILLS)
|
||||
.setBiomeReplacer(Blocks.soul_sand.getState()).setBiome(Biome.HELL_HILLS)
|
||||
.addLake(Blocks.lava.getState(), Blocks.soul_sand.getState(), Blocks.soul_sand.getState(),
|
||||
2, 8, 255, false).addLiquid(Blocks.flowing_lava.getState(), 80, 8, 255, true));
|
||||
registerArea("mizorath", "Kreis Mizorath", new Area(0xff0000, 54029584, 1067.15f, 15).enableMobs()
|
||||
.setPerlinGen(Blocks.hellrock.getState(), Blocks.blood.getState(), 63)
|
||||
.setBiomeReplacer(Blocks.soul_sand.getState()).setBiome(Biome.SOULPLAINS));
|
||||
.setBiomeReplacer(Blocks.soul_sand.getState()).setBiome(Biome.SOUL_PLAINS));
|
||||
registerArea("dargoth", "Kreis Dargoth", new Area(0xff3f0c, 43293629, 1707.15f, 15).enableMobs()
|
||||
.setPerlinGen(Blocks.hellrock.getState(), Blocks.magma.getState(), 63)
|
||||
.setBiomeReplacer(Blocks.soul_sand.getState()).setBiome(Biome.SOULPLAINS));
|
||||
.setBiomeReplacer(Blocks.soul_sand.getState()).setBiome(Biome.SOUL_PLAINS));
|
||||
registerArea("aasirith", "Kreis Aasirith", new Area(0x191919, 36291872, 2482.0f, 1).enableLongCaves().enableMobs()
|
||||
.setPerlinGen(Blocks.rock.getState(), Blocks.magma.getState(), 63)
|
||||
.setBiomeReplacer(Blocks.ash.getState()).setBiome(Biome.ASHLAND)
|
||||
.setBiomeReplacer(Blocks.ash.getState()).setBiome(Biome.ASH)
|
||||
.addLake(Blocks.lava.getState(), Blocks.rock.getState(), Blocks.rock.getState(),
|
||||
2, 8, 255, false).addLiquid(Blocks.flowing_lava.getState(), 80, 8, 255, true));
|
||||
});
|
||||
|
|
|
@ -1,43 +1,36 @@
|
|||
package common.init;
|
||||
|
||||
import common.color.Colorizer;
|
||||
|
||||
public enum WoodType {
|
||||
OAK("oak", "Eichen", null, 20, "apple", 200),
|
||||
SPRUCE("spruce", "Fichten", Colorizer.PINE, 20),
|
||||
BIRCH("birch", "Birken", Colorizer.BIRCH, 20),
|
||||
JUNGLE("jungle", "Tropen", null, 40, "cocoa_powder", 350),
|
||||
ACACIA("acacia", "Akazien", null, 20),
|
||||
DARK_OAK("dark_oak", "Schwarzeichen", null, 20),
|
||||
CHERRY("cherry", "Kirsch", Colorizer.NONE, 20),
|
||||
MAPLE("maple", "Ahorn", Colorizer.NONE, 20),
|
||||
TIAN("tian", "Tian", Colorizer.NONE, 80),
|
||||
BLACKWOOD("blackwood", "Schwarz", Colorizer.NONE, 60);
|
||||
OAK("oak", "Eichen", 20, "apple", 200),
|
||||
SPRUCE("spruce", "Fichten", 20),
|
||||
BIRCH("birch", "Birken", 20),
|
||||
JUNGLE("jungle", "Tropen", 40, "cocoa_powder", 350),
|
||||
ACACIA("acacia", "Akazien", 20),
|
||||
DARK_OAK("dark_oak", "Schwarzeichen", 20),
|
||||
CHERRY("cherry", "Kirsch", 20),
|
||||
MAPLE("maple", "Ahorn", 20),
|
||||
TIAN("tian", "Tian", 80),
|
||||
BLACKWOOD("blackwood", "Schwarz", 60),
|
||||
SWAMP_OAK("swamp_oak", "Sumpfeichen", 20);
|
||||
|
||||
private final String name;
|
||||
private final Colorizer tintType;
|
||||
private final int sapChance;
|
||||
private final int dropChance;
|
||||
private final String item;
|
||||
private final String display;
|
||||
|
||||
private WoodType(String name, String display, Colorizer tint, int sapChance) {
|
||||
this(name, display, tint, sapChance, null, 0);
|
||||
private WoodType(String name, String display, int sapChance) {
|
||||
this(name, display, sapChance, null, 0);
|
||||
}
|
||||
|
||||
private WoodType(String name, String display, Colorizer tint, int sapChance, String item, int dropChance) {
|
||||
private WoodType(String name, String display, int sapChance, String item, int dropChance) {
|
||||
this.name = name;
|
||||
this.tintType = tint;
|
||||
this.sapChance = sapChance;
|
||||
this.dropChance = dropChance;
|
||||
this.item = item;
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
public Colorizer getTintType() {
|
||||
return this.tintType;
|
||||
}
|
||||
|
||||
public int getSaplingChance() {
|
||||
return this.sapChance;
|
||||
}
|
||||
|
|
|
@ -13,7 +13,7 @@ import common.entity.types.EntityLiving;
|
|||
import common.entity.types.IProjectile;
|
||||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.tileentity.TileEntity;
|
||||
import common.util.BlockPos;
|
||||
import common.util.ExtMath;
|
||||
|
@ -287,8 +287,6 @@ public class Item {
|
|||
}
|
||||
|
||||
public int getRenderColor(ItemStack stack, int pass) {
|
||||
if(this.block != null && this.block.isItemColored())
|
||||
return this.block.getRenderColor(this.block.getState());
|
||||
if(pass > 0)
|
||||
return 16777215;
|
||||
int i = stack.getDyeColor();
|
||||
|
@ -307,7 +305,7 @@ public class Item {
|
|||
return null;
|
||||
}
|
||||
|
||||
public Transform getCustomTransform() {
|
||||
public GuiPosition getCustomPosition() {
|
||||
return null;
|
||||
}
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ package common.item.consumable;
|
|||
import common.entity.npc.EntityNPC;
|
||||
import common.init.Items;
|
||||
import common.item.ItemStack;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.world.World;
|
||||
|
||||
public class ItemSoup extends ItemFood
|
||||
|
|
|
@ -6,7 +6,7 @@ import common.entity.npc.EntityNPC;
|
|||
import common.item.CheatTab;
|
||||
import common.item.Item;
|
||||
import common.item.ItemStack;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.util.BlockPos;
|
||||
import common.util.Facing;
|
||||
import common.world.World;
|
||||
|
|
|
@ -13,7 +13,7 @@ import common.item.Item;
|
|||
import common.item.ItemStack;
|
||||
import common.model.Model;
|
||||
import common.model.ModelProvider;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.tileentity.TileEntity;
|
||||
import common.util.BlockPos;
|
||||
import common.util.Facing;
|
||||
|
@ -85,8 +85,8 @@ public class ItemDie extends Item
|
|||
.du("items/die_d" + this.sides + "_top").uv(0, 0, 16, 16);
|
||||
}
|
||||
|
||||
public Transform getCustomTransform() {
|
||||
return Transform.DICE;
|
||||
public GuiPosition getCustomPosition() {
|
||||
return GuiPosition.DICE;
|
||||
}
|
||||
|
||||
public ItemStack dispenseStack(World world, TileEntity source, Vec3 position, BlockPos blockpos, Facing facing, ItemStack stack) {
|
||||
|
|
|
@ -7,7 +7,7 @@ import common.item.CheatTab;
|
|||
import common.item.Item;
|
||||
import common.item.ItemStack;
|
||||
import common.item.WieldType;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.world.World;
|
||||
|
||||
public class ItemCarrotOnAStick extends Item
|
||||
|
|
|
@ -5,7 +5,7 @@ import common.item.CheatTab;
|
|||
import common.item.Item;
|
||||
import common.item.ItemControl;
|
||||
import common.item.ItemStack;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.util.BlockPos;
|
||||
import common.world.World;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ import common.item.CheatTab;
|
|||
import common.item.Item;
|
||||
import common.item.ItemStack;
|
||||
import common.item.WieldType;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.world.World;
|
||||
|
||||
public class ItemFishingRod extends Item
|
||||
|
|
|
@ -8,7 +8,7 @@ import common.item.CheatTab;
|
|||
import common.item.Item;
|
||||
import common.item.ItemStack;
|
||||
import common.item.WieldType;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.util.BlockPos;
|
||||
import common.util.Facing;
|
||||
import common.world.State;
|
||||
|
|
|
@ -10,7 +10,7 @@ import common.item.CheatTab;
|
|||
import common.item.Item;
|
||||
import common.item.ItemStack;
|
||||
import common.item.WieldType;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.util.BoundingBox;
|
||||
import common.util.Vec3;
|
||||
import common.world.World;
|
||||
|
|
|
@ -7,7 +7,7 @@ import common.item.CheatTab;
|
|||
import common.item.Item;
|
||||
import common.item.ItemStack;
|
||||
import common.item.WieldType;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.util.BlockPos;
|
||||
import common.world.World;
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ import common.item.Item;
|
|||
import common.item.ItemControl;
|
||||
import common.item.ItemStack;
|
||||
import common.item.WieldType;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.util.BlockPos;
|
||||
import common.util.ExtMath;
|
||||
import common.util.Facing;
|
||||
|
|
|
@ -11,7 +11,7 @@ import common.item.Item;
|
|||
import common.item.ItemAction;
|
||||
import common.item.ItemStack;
|
||||
import common.item.WieldType;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.world.World;
|
||||
|
||||
public class ItemBow extends Item
|
||||
|
|
|
@ -11,7 +11,7 @@ import common.item.Item;
|
|||
import common.item.ItemAction;
|
||||
import common.item.ItemStack;
|
||||
import common.item.WieldType;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.rng.Random;
|
||||
import common.world.World;
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ import common.item.Item;
|
|||
import common.item.ItemAction;
|
||||
import common.item.ItemStack;
|
||||
import common.item.WieldType;
|
||||
import common.model.Transform;
|
||||
import common.model.GuiPosition;
|
||||
import common.util.BlockPos;
|
||||
import common.world.World;
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
package common.model;
|
||||
|
||||
public enum Transform {
|
||||
IDENTITY(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f),
|
||||
public enum GuiPosition {
|
||||
NORMAL(0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f),
|
||||
DICE(135.0f, -55.0f, 180.0f, 0.0f, 0.0f, 0.0f, 2.75f),
|
||||
STAIRS(0.0f, 180.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f),
|
||||
SMALL(0.0f, 0.0f, 0.0f, 0.0f, 0.25f, 0.0f, 1.25f),
|
||||
|
@ -22,7 +22,7 @@ public enum Transform {
|
|||
private final float translationZ;
|
||||
private final float scale;
|
||||
|
||||
private Transform(float rx, float ry, float rz, float tx, float ty, float tz, float scale) {
|
||||
private GuiPosition(float rx, float ry, float rz, float tx, float ty, float tz, float scale) {
|
||||
this.rotationX = rx;
|
||||
this.rotationY = ry;
|
||||
this.rotationZ = rz;
|
|
@ -10,7 +10,6 @@ public abstract class Model {
|
|||
public abstract Model rotate(float x, float y, float z, Facing.Axis axisIn, float angleIn, boolean rescaleIn);
|
||||
public abstract Model face(String texture, Facing... faces);
|
||||
public abstract Model cull(Facing cull);
|
||||
public abstract Model tint();
|
||||
public abstract Model rot(int rot);
|
||||
public abstract Model uv(float x1, float y1, float x2, float y2);
|
||||
public abstract String getPrimary();
|
||||
|
@ -48,14 +47,6 @@ public abstract class Model {
|
|||
.we().uv(0, 0, 16, 16).noCull();
|
||||
}
|
||||
|
||||
public Model crossTint() {
|
||||
return this
|
||||
.add(0.8f, 0f, 8f, 15.2f, 16f, 8f).noShade().rotate(8, 8, 8, Facing.Axis.Y, 45, true)
|
||||
.ns().uv(0, 0, 16, 16).noCull().tint()
|
||||
.add(8f, 0f, 0.8f, 8f, 16f, 15.2f).noShade().rotate(8, 8, 8, Facing.Axis.Y, 45, true)
|
||||
.we().uv(0, 0, 16, 16).noCull().tint();
|
||||
}
|
||||
|
||||
public Model stairs(boolean upper, boolean inner, boolean outer, boolean left, Facing dir, String down, String up) {
|
||||
this.add(0, 0, 0, 16, 8, 16).d(down).uv(0, 0, 16, 16).u(up).noCull().uv(0, 0, 16, 16).nswe().uv(0, 8, 16, 16);
|
||||
if(outer)
|
||||
|
|
|
@ -35,10 +35,6 @@ public interface ModelProvider {
|
|||
return this;
|
||||
}
|
||||
|
||||
public Model tint() {
|
||||
return this;
|
||||
}
|
||||
|
||||
public Model rot(int rot) {
|
||||
return this;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
package common.model;
|
||||
|
||||
public enum TextureAnimation {
|
||||
FIRE1, FIRE2, FLAME1, FLAME2, LAVAFLOW, LAVA, WATERFLOW, WATER;
|
||||
FLAME_BASE, FLAME_OFFSET, BLACK_FLAME_BASE, BLACK_FLAME_OFFSET, BLUE_FLAME_BASE, BLUE_FLAME_OFFSET, MAGMA_FLOW, MAGMA_STILL, WATER_FLOW, WATER_STILL, SWAMP_WATER_FLOW, SWAMP_WATER_STILL;
|
||||
}
|
||||
|
|
|
@ -1,5 +1,30 @@
|
|||
package common.util;
|
||||
|
||||
public enum PortalType {
|
||||
STAND_BLACK, STAND_RED, STAND_YELLOW, STAND_GREEN, STAND_CYAN, STAND_BLUE, STAND_MAGENTA, STAND_WHITE, FLOOR, VOID;
|
||||
public enum PortalType implements Identifyable, Displayable {
|
||||
DARK("dark", "Dunkles Portal"),
|
||||
CRIMSON("crimson", "Crimson-Portal"),
|
||||
SHINING("shining", "Schillernes Portal"),
|
||||
ARCANE("arcane", "Geheimnisvolles Portal"),
|
||||
RADIATING("radiating", "Strahlendes Portal"),
|
||||
CHAOS("chaos", "Chaos-Portal"),
|
||||
DEEP("deep", "Tiefes Portal"),
|
||||
LIGHT("light", "Helles Portal"),
|
||||
FLOOR("floor", "Flaches Portal"),
|
||||
VOID("void", "Aus der Welt Fallen");
|
||||
|
||||
private final String name;
|
||||
private final String display;
|
||||
|
||||
private PortalType(String name, String display) {
|
||||
this.name = name;
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return this.name;
|
||||
}
|
||||
|
||||
public String getDisplay() {
|
||||
return this.display;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -141,10 +141,14 @@ public abstract class Vars {
|
|||
public static boolean darkDirtSpread = true;
|
||||
@Var(name = "grassDecay")
|
||||
public static boolean grassDecay = true;
|
||||
@Var(name = "swampDecay")
|
||||
public static boolean swampDecay = true;
|
||||
@Var(name = "blackenedSoilDecay")
|
||||
public static boolean darkSoilDecay = true;
|
||||
@Var(name = "grassDrying")
|
||||
public static boolean grassDry = true;
|
||||
@Var(name = "swampDrying")
|
||||
public static boolean swampDry = true;
|
||||
@Var(name = "tallgrassDrying")
|
||||
public static boolean tallgrassDry = true;
|
||||
@Var(name = "flowerDrying")
|
||||
|
|
|
@ -45,7 +45,6 @@ public abstract class AWorldServer extends World {
|
|||
public abstract void sendToAllTrackingEntity(Entity entityIn, Packet packet);
|
||||
public abstract boolean isDaytime();
|
||||
public abstract int getSkylightSubtracted();
|
||||
public abstract boolean isBlockinHighHumidity(BlockPos pos);
|
||||
public abstract <T extends Entity> T findNearestEntityWithinAABB(Class<? extends T> entityType, BoundingBox aabb, T closestTo);
|
||||
public abstract void setBiome(BlockPos pos, Biome biome);
|
||||
public abstract void markChunkDirty(BlockPos pos);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue