add spring water

This commit is contained in:
Sen 2025-06-01 17:24:32 +02:00
parent 1ae189c238
commit 4a6da6d0f7
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
10 changed files with 28 additions and 21 deletions

View file

@ -68,10 +68,10 @@ public class TextureWaterFX extends TextureTicked
f1 = 0.0F; f1 = 0.0F;
} }
float f2 = f1 * f1; float f2 = f1 * f1;
int l1 = (int)(32F + f2 * 32F); int r = (int)(32F + f2 * 32F);
int j2 = (int)(50F + f2 * 64F); int g = (int)(50F + f2 * 64F);
int k2 = 255; int b = 255;
int l2 = (int)(146F + f2 * 50F); int a = (int)(146F + f2 * 50F);
// if(flag) // if(flag)
// { // {
// int i3 = (l1 * 30 + j2 * 59 + k2 * 11) / 100; // int i3 = (l1 * 30 + j2 * 59 + k2 * 11) / 100;
@ -81,7 +81,7 @@ public class TextureWaterFX extends TextureTicked
// j2 = j3; // j2 = j3;
// k2 = k3; // k2 = k3;
// } // }
textureData[i1] = (l2 << 24) | (l1 << 16) | (j2 << 8) | k2; textureData[i1] = (a << 24) | (r << 16) | (g << 8) | b;
} }
} }

View file

@ -67,11 +67,11 @@ public class TextureWaterFlowFX extends TextureTicked
{ {
f1 = 0.0F; f1 = 0.0F;
} }
float f2 = f1 * f1; float v = f1 * f1;
int l1 = (int)(32F + f2 * 32F); int r = (int)(32F + v * 32F);
int j2 = (int)(50F + f2 * 64F); int g = (int)(50F + v * 64F);
int k2 = 255; int b = 255;
int l2 = (int)(146F + f2 * 50F); int a = (int)(146F + v * 50F);
// if(flag) // if(flag)
// { // {
// int i3 = (l1 * 30 + j2 * 59 + k2 * 11) / 100; // int i3 = (l1 * 30 + j2 * 59 + k2 * 11) / 100;
@ -83,7 +83,7 @@ public class TextureWaterFlowFX extends TextureTicked
// } // }
textureData[(i1 & 0x0f) | ((i1 & 0xf0) * 2)] = textureData[((i1 & 0x0f) + 16) | ((i1 & 0xf0) * 2)] = textureData[(i1 & 0x0f) | ((i1 & 0xf0) * 2)] = textureData[((i1 & 0x0f) + 16) | ((i1 & 0xf0) * 2)] =
textureData[(i1 & 0x0f) | (((i1 & 0xf0) + 256) * 2)] = textureData[((i1 & 0x0f) + 16) | (((i1 & 0xf0) + 256) * 2)] = textureData[(i1 & 0x0f) | (((i1 & 0xf0) + 256) * 2)] = textureData[((i1 & 0x0f) + 16) | (((i1 & 0xf0) + 256) * 2)] =
(l2 << 24) | (l1 << 16) | (j2 << 8) | k2; (a << 24) | (r << 16) | (g << 8) | b;
} }
} }

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

View file

@ -292,7 +292,7 @@ public class BlockDynamicLiquid extends BlockLiquid
private boolean canFlowInto(World worldIn, BlockPos pos, State state) private boolean canFlowInto(World worldIn, BlockPos pos, State state)
{ {
Material material = state.getBlock().getMaterial(); Material material = state.getBlock().getMaterial();
return material != this.material && material != Material.LAVA && !this.isBlocked(worldIn, pos, state); return (this.material == Material.LAVA || !(state.getBlock() instanceof BlockLiquid) || (state.getBlock() instanceof BlockStaticLiquid ? BlockLiquid.getFlowingBlock((BlockStaticLiquid)state.getBlock()) : state.getBlock()) == this) && material != this.material && material != Material.LAVA && !this.isBlocked(worldIn, pos, state);
} }
public void onBlockAdded(AWorldServer worldIn, BlockPos pos, State state) public void onBlockAdded(AWorldServer worldIn, BlockPos pos, State state)

View file

@ -330,6 +330,7 @@ public abstract class BlockRegistry {
registerFluid(46, 47, "goo", "Klebrige Masse", false, LiquidType.COLD, true, 0, 60, 0.0f, 10, 5); registerFluid(46, 47, "goo", "Klebrige Masse", false, LiquidType.COLD, true, 0, 60, 0.0f, 10, 5);
registerFluid(48, 49, "nukage", "Radioaktive Masse", false, LiquidType.COLD, true, 10, 10, 4.0f, 2, 2); registerFluid(48, 49, "nukage", "Radioaktive Masse", false, LiquidType.COLD, true, 10, 10, 4.0f, 2, 2);
registerFluid(50, 51, "blood", "Blut", false, LiquidType.COLD, false, 0, 10, 0.0f, 2, 1); registerFluid(50, 51, "blood", "Blut", false, LiquidType.COLD, false, 0, 10, 0.0f, 2, 1);
registerFluid(52, 53, "springwater", "Klares Wasser", true, LiquidType.COLD, false, 0, 5, 0.0f, 1, 1);
registerBlock(60, "coal_ore", registerBlock(60, "coal_ore",

View file

@ -407,6 +407,8 @@ public abstract class Blocks {
public static final BlockWorkbench workbench = get("workbench"); public static final BlockWorkbench workbench = get("workbench");
public static final Block zinc_block = get("zinc_block"); public static final Block zinc_block = get("zinc_block");
public static final BlockOre zinc_ore = get("zinc_ore"); public static final BlockOre zinc_ore = get("zinc_ore");
public static final BlockDynamicLiquid flowing_springwater = get("flowing_springwater");
public static final BlockStaticLiquid springwater = get("springwater");
private static <T extends Block> T get(String id) { private static <T extends Block> T get(String id) {
if(!BlockRegistry.REGISTRY.containsKey(id)) if(!BlockRegistry.REGISTRY.containsKey(id))
@ -427,13 +429,15 @@ public abstract class Blocks {
} }
} }
if(!blocks.isEmpty()) { if(!blocks.isEmpty()) {
List<Block> list = Lists.newArrayList(BlockRegistry.REGISTRY); List<Block> list = Lists.newArrayList(blocks);
Collections.sort(list, Comparator.comparing(block -> BlockRegistry.REGISTRY.getNameForObject(block))); Collections.sort(list, Comparator.comparing(block -> BlockRegistry.REGISTRY.getNameForObject(block)));
System.err.printf("\n*** -------------------------------------------------------------- ***\n\n");
for(Block block : list) { for(Block block : list) {
String name = BlockRegistry.REGISTRY.getNameForObject(block); String name = BlockRegistry.REGISTRY.getNameForObject(block);
System.err.printf("\tpublic static final %s %s = get(\"%s\");\n", block.getClass().getSimpleName(), name, name); System.err.printf("\tpublic static final %s %s = get(\"%s\");\n", block.getClass().getSimpleName(), name, name);
} }
throw new RuntimeException("^^^ " + Blocks.class.getCanonicalName() + ": Blockliste ist unvollständig, Bitte neuen Quellcode einfügen ^^^"); System.err.printf("\n^^^ " + Blocks.class.getCanonicalName() + ": Blockliste ist unvollständig, Bitte neuen Quellcode einfügen ^^^\n");
System.exit(1);
} }
} }
} }

View file

@ -638,6 +638,8 @@ public abstract class Items {
public static final ItemMetalBlock zinc_block = get("zinc_block"); public static final ItemMetalBlock zinc_block = get("zinc_block");
public static final ItemMetal zinc_ingot = get("zinc_ingot"); public static final ItemMetal zinc_ingot = get("zinc_ingot");
public static final ItemMetalBlock zinc_ore = get("zinc_ore"); public static final ItemMetalBlock zinc_ore = get("zinc_ore");
public static final ItemBucket recursive_springwater_bucket = get("recursive_springwater_bucket");
public static final ItemBucket springwater_bucket = get("springwater_bucket");
private static <T extends Item> T get(String id) { private static <T extends Item> T get(String id) {
if(!ItemRegistry.REGISTRY.containsKey(id)) if(!ItemRegistry.REGISTRY.containsKey(id))
@ -663,15 +665,15 @@ public abstract class Items {
iter.remove(); iter.remove();
} }
if(!items.isEmpty()) { if(!items.isEmpty()) {
List<Item> list = Lists.newArrayList(ItemRegistry.REGISTRY); List<Item> list = Lists.newArrayList(items);
Collections.sort(list, Comparator.comparing(item -> ItemRegistry.REGISTRY.getNameForObject(item))); Collections.sort(list, Comparator.comparing(item -> ItemRegistry.REGISTRY.getNameForObject(item)));
System.err.printf("\n*** -------------------------------------------------------------- ***\n\n");
for(Item item : list) { for(Item item : list) {
if(item instanceof ItemNpcSpawner || item instanceof ItemMonsterPlacer)
continue;
String name = ItemRegistry.REGISTRY.getNameForObject(item); String name = ItemRegistry.REGISTRY.getNameForObject(item);
System.err.printf("\tpublic static final %s %s = get(\"%s\");\n", item.getClass().getSimpleName(), name, name); System.err.printf("\tpublic static final %s %s = get(\"%s\");\n", item.getClass().getSimpleName(), name, name);
} }
throw new RuntimeException("^^^ " + Items.class.getCanonicalName() + ": Gegenstandsliste ist unvollständig, Bitte neuen Quellcode einfügen ^^^"); System.err.printf("\n^^^ " + Items.class.getCanonicalName() + ": Gegenstandsliste ist unvollständig, Bitte neuen Quellcode einfügen ^^^\n");
System.exit(1);
} }
} }
} }

View file

@ -650,10 +650,10 @@ public abstract class UniverseRegistry {
registerDomain("Tian'Xin", "tianxin"); registerDomain("Tian'Xin", "tianxin");
registerDimension("Ni'enrath", new Area(-2, "nienrath", 0x7f00ff, 0x7f00ff, 276.15f, 1) registerDimension("Ni'enrath", new Area(-2, "nienrath", 0x7f00ff, 0x7f00ff, 276.15f, 1)
.setPerlinGen(Blocks.tian.getState(), Blocks.water.getState(), 63).setBiome(Biome.TIAN) .setPerlinGen(Blocks.tian.getState(), Blocks.springwater.getState(), 63).setBiome(Biome.TIAN)
.setBiomeReplacer(Blocks.tian.getState()).enableLongCaves().enableMobs().enableSnow() .setBiomeReplacer(Blocks.tian.getState()).enableLongCaves().enableMobs().enableSnow()
.addLake(Blocks.water.getState(), Blocks.tian.getState(), Blocks.tian.getState(), 4, 0, 255, false) .addLake(Blocks.springwater.getState(), Blocks.tian.getState(), Blocks.tian.getState(), 4, 0, 255, false)
.addLiquid(Blocks.flowing_water.getState(), 50, 8, 255, false), "tianxin"); .addLiquid(Blocks.flowing_springwater.getState(), 50, 8, 255, false), "tianxin");
registerDimension("Cyberspace", new Area(-3, "cyberspace", 0x000000, 0x000000, 293.15f, 15) registerDimension("Cyberspace", new Area(-3, "cyberspace", 0x000000, 0x000000, 293.15f, 15)
.setFlatGen(Blocks.stained_hardened_clay.getState().withProperty(BlockColored.COLOR, DyeColor.GREEN), 2) .setFlatGen(Blocks.stained_hardened_clay.getState().withProperty(BlockColored.COLOR, DyeColor.GREEN), 2)