Jump to content

Recommended Posts

Posted

I am modding using minecraft 1.9, and have made a custom dimension. In this dimension, all the blocks are transparent. When I descend below y 62, the sky below me turns black, like the void, and all the transparent blocks look ugly below me, and the fog seems to disappear. I was wondering if there is a way to avoid this (and changing the getVoidFogYFactor() does not help either, it only constantly renders the ugly fog down there or gives me the same problem as before). Another thought I had was to move the entire dimension upwards so the bottom bedrock layer is at level 64 (as in offset its y value) so as to avoid this problem of the fog. However, I don't know much about working with noise and chunk providers, etc.. Here's my code:

 

Chunk Provider:

package com.theflash.dimension;

import com.theflash.blocks.FlashBlocks;
import net.minecraft.block.BlockFalling;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.entity.EnumCreatureType;
import net.minecraft.init.Blocks;
import net.minecraft.util.math.BlockPos;
import net.minecraft.util.math.MathHelper;
import net.minecraft.world.ChunkCoordIntPair;
import net.minecraft.world.World;
import net.minecraft.world.biome.BiomeGenBase;
import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.chunk.ChunkPrimer;
import net.minecraft.world.chunk.IChunkGenerator;
import net.minecraft.world.gen.MapGenBase;
import net.minecraft.world.gen.MapGenCavesHell;
import net.minecraft.world.gen.NoiseGeneratorOctaves;
import net.minecraft.world.gen.structure.MapGenNetherBridge;

import java.util.List;
import java.util.Random;

public class ChunkProviderSpeedForce implements IChunkGenerator
{
protected static final IBlockState stateAir = Blocks.air.getDefaultState();
protected static final IBlockState stateSpeedForceOre = FlashBlocks.speedForceOre.getDefaultState();
protected static final IBlockState stateBedrock = Blocks.bedrock.getDefaultState();
//protected static final IBlockState field_185943_d = Blocks.lava.getDefaultState();
//protected static final IBlockState field_185944_e = Blocks.gravel.getDefaultState();
//protected static final IBlockState field_185945_f = Blocks.soul_sand.getDefaultState();
private final World world;
private final boolean field_185953_o;
private final Random rand;
public NoiseGeneratorOctaves field_185946_g;
public NoiseGeneratorOctaves field_185947_h;
double[] field_185948_i;
double[] field_185949_j;
double[] field_185950_k;
double[] noiseData4;
double[] field_185951_m;
/**
 * Holds the noise used to determine whether slowsand can be generated at a location
 */
private double[] slowsandNoise = new double[256];
private double[] gravelNoise = new double[256];
private double[] field_185955_s = new double[256];
private double[] field_185956_t;
private NoiseGeneratorOctaves field_185957_u;
private NoiseGeneratorOctaves field_185958_v;
private NoiseGeneratorOctaves field_185959_w;
/**
 * Determines whether slowsand or gravel can be generated at a location
 */
private NoiseGeneratorOctaves slowsandGravelNoiseGen;
/**
 * Determines whether something other than nettherack can be generated at a location
 */
private NoiseGeneratorOctaves netherrackExculsivityNoiseGen;
private MapGenNetherBridge genNetherBridge = new MapGenNetherBridge();
private MapGenBase genNetherCaves = new MapGenCavesHell();

public ChunkProviderSpeedForce(World worldIn, boolean p_i45637_2_, long seed)
{
	this.world = worldIn;
	this.field_185953_o = p_i45637_2_;
	this.rand = new Random(seed);
	this.field_185957_u = new NoiseGeneratorOctaves(this.rand, 16);
	this.field_185958_v = new NoiseGeneratorOctaves(this.rand, 16);
	this.field_185959_w = new NoiseGeneratorOctaves(this.rand, ;
	this.slowsandGravelNoiseGen = new NoiseGeneratorOctaves(this.rand, 4);
	this.netherrackExculsivityNoiseGen = new NoiseGeneratorOctaves(this.rand, 4);
	this.field_185946_g = new NoiseGeneratorOctaves(this.rand, 10);
	this.field_185947_h = new NoiseGeneratorOctaves(this.rand, 16);
	worldIn.setSeaLevel(0);

	net.minecraftforge.event.terraingen.InitNoiseGensEvent.ContextHell ctx = new net.minecraftforge.event.terraingen.InitNoiseGensEvent.ContextHell(
			field_185957_u, field_185958_v, field_185959_w, slowsandGravelNoiseGen, netherrackExculsivityNoiseGen,
			field_185946_g, field_185947_h);
	ctx = net.minecraftforge.event.terraingen.TerrainGen.getModdedNoiseGenerators(worldIn, this.rand, ctx);
	this.field_185957_u = ctx.getLPerlin1();
	this.field_185958_v = ctx.getLPerlin2();
	this.field_185959_w = ctx.getPerlin();
	this.slowsandGravelNoiseGen = ctx.getPerlin2();
	this.netherrackExculsivityNoiseGen = ctx.getPerlin3();
	this.field_185946_g = ctx.getScale();
	this.field_185947_h = ctx.getDepth();
	this.genNetherBridge = (MapGenNetherBridge) net.minecraftforge.event.terraingen.TerrainGen
			.getModdedMapGen(genNetherBridge,
					net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.NETHER_BRIDGE);
	this.genNetherCaves = net.minecraftforge.event.terraingen.TerrainGen.getModdedMapGen(genNetherCaves,
			net.minecraftforge.event.terraingen.InitMapGenEvent.EventType.NETHER_CAVE);
}

public void func_185936_a(int p_185936_1_, int p_185936_2_, ChunkPrimer p_185936_3_)
{
	int i = 4;
	int j = this.world.getSeaLevel() / 2 + 1;
	int k = i + 1;
	int l = 17;
	int i1 = i + 1;
	this.field_185956_t = this.func_185938_a(this.field_185956_t, p_185936_1_ * i, 0, p_185936_2_ * i, k, l, i1);

	for (int j1 = 0; j1 < i; ++j1)
	{
		for (int k1 = 0; k1 < i; ++k1)
		{
			for (int l1 = 0; l1 < 16; ++l1)
			{
				double d0 = 0.125D;
				double d1 = this.field_185956_t[((j1 + 0) * i1 + k1 + 0) * l + l1 + 0];
				double d2 = this.field_185956_t[((j1 + 0) * i1 + k1 + 1) * l + l1 + 0];
				double d3 = this.field_185956_t[((j1 + 1) * i1 + k1 + 0) * l + l1 + 0];
				double d4 = this.field_185956_t[((j1 + 1) * i1 + k1 + 1) * l + l1 + 0];
				double d5 = (this.field_185956_t[((j1 + 0) * i1 + k1 + 0) * l + l1 + 1] - d1) * d0;
				double d6 = (this.field_185956_t[((j1 + 0) * i1 + k1 + 1) * l + l1 + 1] - d2) * d0;
				double d7 = (this.field_185956_t[((j1 + 1) * i1 + k1 + 0) * l + l1 + 1] - d3) * d0;
				double d8 = (this.field_185956_t[((j1 + 1) * i1 + k1 + 1) * l + l1 + 1] - d4) * d0;

				for (int i2 = 0; i2 < 8; ++i2)
				{
					double d9 = 0.25D;
					double d10 = d1;
					double d11 = d2;
					double d12 = (d3 - d1) * d9;
					double d13 = (d4 - d2) * d9;

					for (int j2 = 0; j2 < 4; ++j2)
					{
						double d14 = 0.25D;
						double d15 = d10;
						double d16 = (d11 - d10) * d14;

						for (int k2 = 0; k2 < 4; ++k2)
						{
							IBlockState iblockstate = null;

							if (l1 * 8 + i2 < j)
							{
								//iblockstate = field_185943_d;
							}

							if (d15 > 0.0D)
							{
								iblockstate = stateSpeedForceOre;
							}

							int l2 = j2 + j1 * 4;
							int i3 = i2 + l1 * 8;
							int j3 = k2 + k1 * 4;
							p_185936_3_.setBlockState(l2, i3, j3, iblockstate);
							d15 += d16;
						}

						d10 += d12;
						d11 += d13;
					}

					d1 += d5;
					d2 += d6;
					d3 += d7;
					d4 += d8;
				}
			}
		}
	}
}

public void func_185937_b(int p_185937_1_, int p_185937_2_, ChunkPrimer p_185937_3_)
{
	if (!net.minecraftforge.event.ForgeEventFactory
			.onReplaceBiomeBlocks(this, p_185937_1_, p_185937_2_, p_185937_3_, this.world))
		return;
	int i = this.world.getSeaLevel() + 1;
	double d0 = 0.03125D;
	this.slowsandNoise = this.slowsandGravelNoiseGen
			.generateNoiseOctaves(this.slowsandNoise, p_185937_1_ * 16, p_185937_2_ * 16, 0, 16, 16, 1, d0, d0,
					1.0D);
	this.gravelNoise = this.slowsandGravelNoiseGen
			.generateNoiseOctaves(this.gravelNoise, p_185937_1_ * 16, 109, p_185937_2_ * 16, 16, 1, 16, d0, 1.0D,
					d0);
	this.field_185955_s = this.netherrackExculsivityNoiseGen
			.generateNoiseOctaves(this.field_185955_s, p_185937_1_ * 16, p_185937_2_ * 16, 0, 16, 16, 1, d0 * 2.0D,
					d0 * 2.0D, d0 * 2.0D);

	for (int j = 0; j < 16; ++j)
	{
		for (int k = 0; k < 16; ++k)
		{
			boolean flag = this.slowsandNoise[j + k * 16] + this.rand.nextDouble() * 0.2D > 0.0D;
			boolean flag1 = this.gravelNoise[j + k * 16] + this.rand.nextDouble() * 0.2D > 0.0D;
			int l = (int) (this.field_185955_s[j + k * 16] / 3.0D + 3.0D + this.rand.nextDouble() * 0.20D);
			int i1 = -1;
			IBlockState iblockstate = stateSpeedForceOre;
			IBlockState iblockstate1 = stateSpeedForceOre;

			for (int j1 = 127; j1 >= 0; --j1)
			{
				if (j1 < 127 - this.rand.nextInt(5) && j1 > this.rand.nextInt(5))
				{
					IBlockState iblockstate2 = p_185937_3_.getBlockState(k, j1, j);

					if (iblockstate2.getBlock() != null && iblockstate2.getMaterial() != Material.air)
					{
						if (iblockstate2.getBlock() == Blocks.netherrack)
						{
							if (i1 == -1)
							{
								if (l <= 0)
								{
									iblockstate = stateAir;
									iblockstate1 = stateSpeedForceOre;
								}
								else if (j1 >= i - 4 && j1 <= i + 1)
								{
									iblockstate = stateSpeedForceOre;
									iblockstate1 = stateSpeedForceOre;

									if (flag1)
									{
										//iblockstate = field_185944_e;
										iblockstate1 = stateSpeedForceOre;
									}

									if (flag)
									{
										//iblockstate = field_185945_f;
										//iblockstate1 = field_185945_f;
									}
								}

								if (j1 < i && (iblockstate == null || iblockstate.getMaterial() == Material.air))
								{
									//iblockstate = field_185943_d;
								}

								i1 = l;

								if (j1 >= i - 1)
								{
									p_185937_3_.setBlockState(k, j1, j, iblockstate);
								}
								else
								{
									p_185937_3_.setBlockState(k, j1, j, iblockstate1);
								}
							}
							else if (i1 > 0)
							{
								--i1;
								p_185937_3_.setBlockState(k, j1, j, iblockstate1);
							}
						}
					}
					else
					{
						i1 = -1;
					}
				}
				else
				{
					p_185937_3_.setBlockState(k, j1, j, stateBedrock);
				}
			}
		}
	}
}

public Chunk provideChunk(int x, int z)
{
	this.rand.setSeed((long) x * 341873128712L + (long) z * 132897987541L);
	ChunkPrimer chunkprimer = new ChunkPrimer();
	this.func_185936_a(x, z, chunkprimer);
	this.func_185937_b(x, z, chunkprimer);
	this.genNetherCaves.generate(this.world, x, z, chunkprimer);

	if (this.field_185953_o)
	{
		this.genNetherBridge.generate(this.world, x, z, chunkprimer);
	}

	Chunk chunk = new Chunk(this.world, chunkprimer, x, z);
	BiomeGenBase[] abiomegenbase = this.world.getBiomeProvider()
			.loadBlockGeneratorData((BiomeGenBase[]) null, x * 16, z * 16, 16, 16);
	byte[] abyte = chunk.getBiomeArray();

	for (int i = 0; i < abyte.length; ++i)
	{
		abyte[i] = (byte) BiomeGenBase.getIdForBiome(abiomegenbase[i]);
	}

	chunk.resetRelightChecks();
	return chunk;
}

private double[] func_185938_a(double[] p_185938_1_, int p_185938_2_, int p_185938_3_, int p_185938_4_,
		int p_185938_5_, int p_185938_6_, int p_185938_7_)
{
	if (p_185938_1_ == null)
	{
		p_185938_1_ = new double[p_185938_5_ * p_185938_6_ * p_185938_7_];
	}

	net.minecraftforge.event.terraingen.ChunkGeneratorEvent.InitNoiseField event = new net.minecraftforge.event.terraingen.ChunkGeneratorEvent.InitNoiseField(
			this, p_185938_1_, p_185938_2_, p_185938_3_, p_185938_4_, p_185938_5_, p_185938_6_, p_185938_7_);
	net.minecraftforge.common.MinecraftForge.EVENT_BUS.post(event);
	if (event.getResult() == net.minecraftforge.fml.common.eventhandler.Event.Result.DENY)
		return event.getNoisefield();

	double d0 = 684.412D;
	double d1 = 2053.236D;
	this.noiseData4 = this.field_185946_g
			.generateNoiseOctaves(this.noiseData4, p_185938_2_, p_185938_3_, p_185938_4_, p_185938_5_, 1,
					p_185938_7_, 1.0D, 0.0D, 1.0D);
	this.field_185951_m = this.field_185947_h
			.generateNoiseOctaves(this.field_185951_m, p_185938_2_, p_185938_3_, p_185938_4_, p_185938_5_, 1,
					p_185938_7_, 100.0D, 0.0D, 100.0D);
	this.field_185948_i = this.field_185959_w
			.generateNoiseOctaves(this.field_185948_i, p_185938_2_, p_185938_3_, p_185938_4_, p_185938_5_,
					p_185938_6_, p_185938_7_, d0 / 80.0D, d1 / 60.0D, d0 / 80.0D);
	this.field_185949_j = this.field_185957_u
			.generateNoiseOctaves(this.field_185949_j, p_185938_2_, p_185938_3_, p_185938_4_, p_185938_5_,
					p_185938_6_, p_185938_7_, d0, d1, d0);
	this.field_185950_k = this.field_185958_v
			.generateNoiseOctaves(this.field_185950_k, p_185938_2_, p_185938_3_, p_185938_4_, p_185938_5_,
					p_185938_6_, p_185938_7_, d0, d1, d0);
	int i = 0;
	double[] adouble = new double[p_185938_6_];

	for (int j = 0; j < p_185938_6_; ++j)
	{
		adouble[j] = Math.cos((double) j * Math.PI * 6.0D / (double) p_185938_6_) * 2.0D;
		double d2 = (double) j;

		if (j > p_185938_6_ / 2)
		{
			d2 = (double) (p_185938_6_ - 1 - j);
		}

		if (d2 < 4.0D)
		{
			d2 = 4.0D - d2;
			adouble[j] -= d2 * d2 * d2 * 10.0D;
		}
	}

	for (int l = 0; l < p_185938_5_; ++l)
	{
		for (int i1 = 0; i1 < p_185938_7_; ++i1)
		{
			double d3 = 0.0D;

			for (int k = 0; k < p_185938_6_; ++k)
			{
				double d4 = 0.0D;
				double d5 = adouble[k];
				double d6 = this.field_185949_j[i] / 512.0D;
				double d7 = this.field_185950_k[i] / 512.0D;
				double d8 = (this.field_185948_i[i] / 10.0D + 1.0D) / 2.0D;

				if (d8 < 0.0D)
				{
					d4 = d6;
				}
				else if (d8 > 1.0D)
				{
					d4 = d7;
				}
				else
				{
					d4 = d6 + (d7 - d6) * d8;
				}

				d4 = d4 - d5;

				if (k > p_185938_6_ - 4)
				{
					double d9 = (double) ((float) (k - (p_185938_6_ - 4)) / 3.0F);
					d4 = d4 * (1.0D - d9) + -10.0D * d9;
				}

				if ((double) k < d3)
				{
					double d10 = (d3 - (double) k) / 4.0D;
					d10 = MathHelper.clamp_double(d10, 0.0D, 1.0D);
					d4 = d4 * (1.0D - d10) + -10.0D * d10;
				}

				p_185938_1_[i] = d4;
				++i;
			}
		}
	}

	return p_185938_1_;
}

public void populate(int x, int z)
{
	BlockFalling.fallInstantly = true;
	net.minecraftforge.event.ForgeEventFactory.onChunkPopulate(true, this, this.world, x, z, false);
	BlockPos blockpos = new BlockPos(x * 16, 0, z * 16);
	ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(x, z);

	net.minecraftforge.event.ForgeEventFactory.onChunkPopulate(false, this, this.world, x, z, false);
	net.minecraftforge.common.MinecraftForge.EVENT_BUS
			.post(new net.minecraftforge.event.terraingen.DecorateBiomeEvent.Pre(this.world, this.rand, blockpos));

	net.minecraftforge.common.MinecraftForge.EVENT_BUS
			.post(new net.minecraftforge.event.terraingen.DecorateBiomeEvent.Post(this.world, this.rand, blockpos));

	BlockFalling.fallInstantly = false;
}

public boolean generateStructures(Chunk chunkIn, int x, int z)
{
	return false;
}

public List<BiomeGenBase.SpawnListEntry> getPossibleCreatures(EnumCreatureType creatureType, BlockPos pos)
{
	if (creatureType == EnumCreatureType.MONSTER)
	{
		if (this.genNetherBridge.func_175795_b(pos))
		{
			return this.genNetherBridge.getSpawnList();
		}

		if (this.genNetherBridge.isPositionInStructure(this.world, pos)
				&& this.world.getBlockState(pos.down()).getBlock() == Blocks.nether_brick)
		{
			return this.genNetherBridge.getSpawnList();
		}
	}

	BiomeGenBase biomegenbase = this.world.getBiomeGenForCoords(pos);
	return biomegenbase.getSpawnableList(creatureType);
}

public BlockPos getStrongholdGen(World worldIn, String structureName, BlockPos position)
{
	return null;
}

public void recreateStructures(Chunk chunkIn, int x, int z)
{
	this.genNetherBridge.generate(this.world, x, z, (ChunkPrimer) null);
}
}

 

WorldProvider:

 

package com.theflash.dimension;

import net.minecraft.entity.Entity;
import net.minecraft.util.math.Vec3d;
import net.minecraft.world.DimensionType;
import net.minecraft.world.WorldProvider;
import net.minecraft.world.biome.BiomeProviderSingle;
import net.minecraft.world.border.WorldBorder;
import net.minecraft.world.chunk.Chunk;
import net.minecraft.world.chunk.IChunkGenerator;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

public class WorldProviderSpeedForce extends WorldProvider
{
/**
 * creates a new world chunk manager for WorldProvider
 */
public void registerWorldChunkManager()
{
	this.worldChunkMgr = new BiomeProviderSingle(BiomeGenSpeedForce.instance);
	this.isHellWorld = true;
	this.hasNoSky = false;
}

/**
 * Return Vec3D with biome specific fog color
 */
@SideOnly(Side.CLIENT) public Vec3d getFogColor(float p_76562_1_, float p_76562_2_)
{
	return new Vec3d(0.6, 0.6, 0.0);
}

@SideOnly(Side.CLIENT) public Vec3d getSkyColor(Entity cameraEntity, float partialTicks)
{
	return new Vec3d(1.0, 1.0, 0.0);
}

public float getCloudHeight()
{
	return 4098.0F;
}

@SideOnly(Side.CLIENT) public float getStarBrightness(float par1)
{
	return 0;
}

public double getMovementFactor()
{
	return 64.0D;
}

public void setWorldTime(long time)
{
	this.worldObj.getWorldInfo().setWorldTime(1000);
}

@SideOnly(Side.CLIENT) public Vec3d getCloudColor(float partialTicks)
{
	return new Vec3d(1, 1, 0.0);
}

public boolean canDoLightning(Chunk chunk)
{
	return true;
}

/**
 * Creates the light to brightness table
 */
protected void generateLightBrightnessTable()
{
	float f = 0.1F;

	for (int i = 0; i <= 15; ++i)
	{
		float f1 = 1.0F - (float) i / 15.0F;
		this.lightBrightnessTable[i] = (1.0F - f1) / (f1 * 3.0F + 1.0F) * (1.0F - f) + f;
	}
}

public IChunkGenerator createChunkGenerator()
{
	return new ChunkProviderSpeedForce(this.worldObj, this.worldObj.getWorldInfo().isMapFeaturesEnabled(),
			this.worldObj.getSeed());
}

/**
 * Returns 'true' if in the "main surface world", but 'false' if in the Nether or End dimensions.
 */
public boolean isSurfaceWorld()
{
	return true;
}

/**
 * Will check if the x, z position specified is alright to be set as the map spawn point
 */
public boolean canCoordinateBeSpawn(int x, int z)
{
	return false;
}

/**
 * Calculates the angle of sun and moon in the sky relative to a specified time (usually worldTime)
 */
public float calculateCelestialAngle(long worldTime, float partialTicks)
{
	return 0.5F;
}

/**
 * True if the player can respawn in this dimension (true = overworld, false = nether).
 */
public boolean canRespawnHere()
{
	return false;
}

/**
 * Returns true if the given X,Z coordinate should show environmental fog.
 */
@SideOnly(Side.CLIENT) public boolean doesXZShowFog(int x, int z)
{
	return true;
}

public WorldBorder getWorldBorder()
{
	return new WorldBorder()
	{
		public double getCenterX()
		{
			return super.getCenterX() / 8.0D;
		}

		public double getCenterZ()
		{
			return super.getCenterZ() / 8.0D;
		}
	};
}

public DimensionType getDimensionType()
{
	return DimensionType.getById(2);
}

public String getWelcomeMessage()
{
	return "Entering The Speed Force";
}

public String getDepartMessage()
{
	return "Exiting The Speed Force";
}
}

 

BiomeGen (not really necessary I think, but I'll throw it in here anyways)

 

package com.theflash.dimension;

import net.minecraft.world.biome.BiomeGenBase;

public class BiomeGenSpeedForce extends BiomeGenBase
{
public static BiomeGenSpeedForce instance = new BiomeGenSpeedForce(
		(new BiomeGenBase.BiomeProperties("The Speed Force")));

public BiomeGenSpeedForce(BiomeGenBase.BiomeProperties properties)
{
	super(properties);
	this.spawnableCaveCreatureList.clear();
	this.spawnableCreatureList.clear();
	this.spawnableMonsterList.clear();
	this.spawnableWaterCreatureList.clear();
}
}

 

Thanks!

  • 1 month later...
Posted

If the fog isn't necessarly you can try removing all the fog related methods in the World Provider :) Also could you tell me how you registered the dimension? :)

Don't blame me if i always ask for your help. I just want to learn to be better :)

Posted

If the fog isn't necessarly you can try removing all the fog related methods in the World Provider :) Also could you tell me how you registered the dimension? :)

Don't blame me if i always ask for your help. I just want to learn to be better :)

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • As long as the packets you are sending aren't lost, there's nothing wrong with what you're currently doing. Although, this sounds like something that would benefit from you making your own datapack registry instead of trying to arbitrarily sync static maps. Check out `DataPackRegistryEvent.NewRegistry`.
    • Hey all, I've been working a lot with datapacks lately, and I'm wondering what the most efficient way to get said data from server to client is.  I'm currently using packets, but given that a lot of the data I'm storing involves maps along the lines of Map<ResourceLocation, CustomDataType>, it can easily start to get messy if I need to transmit a lot of that data all at once. Recently I started looking into the ReloadableServerResources class, which is where Minecraft stores its built-ins.  I see you can access it via the server from the server's resources.managers, and it seems like this can be done even from the client to appropriately retrieve data from the server, unless I'm misunderstanding.  However, from what I can tell, this only works via built-in methods such as getRecipeManager() or getLootTables(), etc.  These are all SimpleJsonResourceReloadListeners, just like my datapack entries are, so it seems like it could be possible for me to access my datapack entries similarly?  But I don't see anywhere in ReloadableServerResources that stores loaded modded entries, so either I'm looking in the wrong place or it doesn't seem to be a thing. Are packets really the best way of doing this, or am I missing a method that would let me use ReloadableServerResources or something similar?
    • Hi, everyone! I'm new to minecraft modding stuff and want ask you some questions. 1. I checked forge references and saw there com.mojang and net.minecraft (not net.minecraftforge) and as I understand it's original game packages with all minecraft logic inside including renderers and so on, right? 2. Does it mean that forge has a limited set of instruments which doesn't cover all the aspects of the game? If make my question more specific then does forge provide such instruments that allow me totally change minecraft itself, like base mechanics and etc.? Or I have to use "original game packages" to implement such things? 3. I actively learning basic concepts with forge documentation and tutorials. So in my plans make different inventory system like in diabloids. Is that possible with forge? 4. It is last question related to the second one. So how deeply I can change minecraft with forge? I guess all my questions above because of that I haven't globally understanding what forge is and how it works inside and how it works with minecraft. It would be great if you provide some links or topics about it or explain it by yourself but I guess it's to big to be explained in that post at once. Anyway, thank you all for any help!
    • Im trying add to block a hole in center, just a usual block and in center of it on up side, there is should be a hole. I tried to add it via BlockModelBuilder, but its not working. Problem is that it only can change block size outside. I tried it to do with VoxelShape and its working, but its has been on server side and looks like its just changed collision shape, but for client, there is a texture covering this hole. I tried to use: base.renderType("cutout"); and removed some pixels from texture. I thought its should work, but game optimization makes block inside looks transparent. So, only custom model?
    • I Made this modpack myself and When i Open a world with embeddium enabeld no chuncks are loading in and when i have the mod brute force rendering culling eanbled the game will not start     This is the Modlist:   Chef's Delight [Forge] (by redstone3game) Yung Structures Addon for Loot Integrations (by someaddon) Macaw's Paths and Pavings (by sketch_macaw) My Nether's Delight (by soytutta) Client Crafting (by someaddon) Integrated Stronghold (by CraisinLord) Delightful (by brnbrd) Immersive Aircraft [Fabric/Forge] (by Conczin) Mysterious Mountain Lib (by sz0999312) Infinity Buttons (by LarsMans) SuperMartijn642's Core Lib (by SuperMartijn642) Clumps (by Jaredlll08) Embeddium (by FiniteReality) Cosmetic Armor Reworked (by LainMI) Creeper Overhaul (by joosh_7889) Balm (by BlayTheNinth) HT's TreeChop (by hammertater) Fastload (by StockiesLad) ImmediatelyFast (by RaphiMC) Integrated Dungeons and Structures (by CraisinLord) Mobtimizations - Entity Performance Fixes (by Corosus) Handcrafted (by terrariumearth) SuperMartijn642's Config Lib (by SuperMartijn642) Dramatic Doors (by FizzWare) Allurement (by TeamAbnormals) Xaero's World Map (by xaero96) Panda's Extra Details (by ThePandaOliver) Geophilic – Vanilla Biome Overhauls (by bebebea_loste) Auroras (by Verph) Naturalist (by Starfish_Studios) Iron Chests (by ProgWML6) Corpse (by henkelmax) FastSuite (by Shadows_of_Fire) Controlling (by Jaredlll08) Ash API (by Trikzon) Eating Animation [Neo/Forge] (by matyrobbrt) Macaw's Doors (by sketch_macaw) ForgeEndertech (by EnderLanky) Philip's Ruins (by philipmoddev) Resourceful Config (by ThatGravyBoat) ModernFix (by embeddedt) Quark (by Vazkii) Illager Invasion [Forge & Fabric] (by Fuzs) Integrated API (by CraisinLord) Redirector [Modern] (by pOtAto__bOy) Macaw's Fences and Walls (by sketch_macaw) Diagonal Windows [Forge & Fabric] (by Fuzs) Waystones (by BlayTheNinth) [EMF] Entity Model Features [Fabric & Forge] (by Traben) FerriteCore ((Neo)Forge) (by malte0811) CodeChicken Lib 1.8.+ (by covers1624) Macaw's Roofs (by sketch_macaw) Server Country Flags (by khajiitos) Bookshelf (by DarkhaxDev) Comforts (Fabric/Forge/Quilt) (by TheIllusiveC4) Enchantment Descriptions (by DarkhaxDev) Entity Culling Fabric/Forge (by tr7zw) Embeddium++ (by SrRapero720) Embeddium (Rubidium) Extra (by dimadencep) Smooth Boot (Reloaded) (by AbdElAziz333) Dungeons and Taverns (by Nova_Wostra) Placeables (by ItzSkay) CoroUtil (by Corosus) Small Ships [Fabric & Forge] (by talhanation) Trade Cycling (by henkelmax) Better Fps - Render Distance[Forge] (by someaddon) Better Villages - Forge (by jtl_elisa) PandaLib (by ThePandaOliver) Curios API (Forge/NeoForge) (by TheIllusiveC4) Stoneworks [Forge & Fabric] (by Fuzs) Pastel Shaders (by ElocinDev) Integrated Villages (by CraisinLord) More Axolotl Variants API (by AkashiiKun69) Potato Shader (by RRe36) Better Archeology (by Pandarix) Block Runner [Forge & Fabric] (by Fuzs) Cloth Config API (Fabric/Forge/NeoForge) (by shedaniel) Kiwi 🥝 (Neo/Forge) (by Snownee) Macaw's Lights and Lamps (by sketch_macaw) Loot Integrations (by someaddon) Farmers Structures (by BlackAuresArt) Wilderness (by ketok) Corpse x Curios API Compat (by Project8gbDeRam) Friends&Foes (Forge/NeoForge) (Copper Golem,Glare,Crab,Moobloom,Iceologer,Rascal,Tuff Golem,Wildfire,Illusioner) (by Faboslav) More Mob Variants (by nyuppo) Better Than Mending (by legobmw99) Remove Reloading Screen (by dimadencep) Simply Swords [Fabric & Forge] (by sweenuss) Better Brightness Slider (by LaidBackSloth) Krypton Reforged (by Txni) AppleSkin (by squeek502) Supplementaries Squared (by plantspookable) Horse Expert (by Fuzs) YUNG's Menu Tweaks (Forge) (by YUNGNICKYOUNG) Pet Cemetery (by TeamAbnormals) Leaky - Item Lag Fix[Forge/Fabric] (by someaddon) Tectonic (by Apollo) Saturn (by AbdElAziz333) Searchables (by Jaredlll08) Inventory HUD+ (by dmitrylovin) Moonlight Lib (by MehVahdJukaar) Explorify – Dungeons & Structures (by bebebea_loste) Placebo (by Shadows_of_Fire) Overflowing Bars [Forge & Fabric] (by Fuzs) Citadel (by sbom_xela) Alex's Mobs - Naturalist Compat (by Kanadeyoru) Forge CIT (by tfarecnim) Create (by simibubi) Starlight (Forge) (by Spottedleaf) [ETF] Entity Texture Features - [Fabric & Forge] (by Traben) Advanced Chimneys (by EnderLanky) Corn Delight[Forge] (by sz0999312) Trials Chambers [1.20.1 Backport] (by Jusey1z) MVS - Moog's Voyager Structures (by finndog_123) Macaw's Paintings (by sketch_macaw) Alternate Current (by SpaceWalkerRS) Hopo Better Ruined Portals (Fabric/Forge/NeoForge) (by hoponopono) Alex's Delight (by Baisylia) Macaw's Biomes O' Plenty (by Samlegamer_) Resourceful Lib (by ThatGravyBoat) FindMe (by Buuz135) Macaw's Bridges (by sketch_macaw) YUNG's Better Witch Huts (Forge) (by YUNGNICKYOUNG) MNS - Moog's Nether Structures (by finndog_123) Mowzie's Mobs (by bobmowzie) FastWorkbench (by Shadows_of_Fire) Transparent (by Trikzon) Artifacts (by ochotonida) Passable Foliage 🌳 (Neo/Forge) (by Snownee) Supplementaries (by MehVahdJukaar) Atmospheric (by TeamAbnormals) Alex's Caves (by sbom_xela) Alex's Caves Delight (by FixerLink1) Ocean's Delight (by scouter567) Brute force Rendering Culling (by RogoShum) fix GPU memory leak[Forge/Fabric] (by someaddon) Burnt: Better Vanilla Fire (by pxlbnk) YDM's Weapon Master (by YourDailyModderx) Curios Compat Layer for Accessories (by Blodhgarm) MES - Moog's End Structures (by finndog_123) Pale Garden and Creaking (by MinoBanana) YUNG's Better Jungle Temples (Forge) (by YUNGNICKYOUNG) AddonsLib (by Samlegamer_) Athena (by CodexAdrian) MakeUp - Ultra Fast | Shaders (by XavierFST) Xaero's Minimap (by xaero96) Macaw's Trapdoors (by sketch_macaw) Translocators 1.8.+ (by covers1624) Additional Structures (by XxRexRaptorxX) AI Improvements (by QueenOfMissiles) Autochef's Delight (by Snownee) Iron Furnaces (by XenoMustache) Iris/Oculus & GeckoLib Compat (by ElocinDev) Connectivity (by someaddon) Easy Magic [Forge & Fabric] (by Fuzs) Blueprint (by TeamAbnormals) VillagersPlus (FORGE) (by finallion_13) Panda's Falling Tree's (by ThePandaOliver) Xaero's Minimap & World Map - Waystones Compatibility [Forge] (by ArcaneAlloy) ServerCore (by Wesley8081) MrCrayfish's Furniture Mod: Refurbished (by MrCrayfish) Just Enough Items (JEI) (by mezz) Farmer's Delight (by vectorwing) Old fisherman swamp house (by SuperWarioModTeam) YUNG's Better Nether Fortresses (Forge) (by YUNGNICKYOUNG) Lithostitched (by Apollo) FastFurnace (by Shadows_of_Fire) DrDestens MCShaders (by DrDesten) Server Performance - Smooth Chunk Save[Forge/Fabric] (by someaddon) Noisium (by Steveplays28) Puzzles Lib [Forge & Fabric] (by Fuzs) YUNG's Bridges (Forge) (by YUNGNICKYOUNG) Alex's Mobs (by sbom_xela) Regions Unexplored (forge/fabric) (by UHQ_GAMES) Architectury API (by shedaniel) Radium Reforged (by Asek3) Separated Leaves (by LarsMans) CullLessLeaves Reforged (Unofficial) (by ccr4ft3r) Just Enough Effect Descriptions (JEED) (by MehVahdJukaar) FastBoot (by dnlayu) Framework (by MrCrayfish) Chipped (by terrariumearth) MSS - Moog's Soaring Structures (by finndog_123) GeckoLib (by Gecko) CB Multipart (by covers1624) GlitchCore (by TheAdubbz) Realm RPG: Fallen Adventurers (by nocubeyt) Zume (by Nolij) Library Ferret - Forge (by jtl_elisa) Recipe Essentials[Forge/Fabric] (by someaddon) Macaw's Stairs (by sketch_macaw) Accessories (by Blodhgarm) What Are They Up To (Watut) (by Corosus) GroovyModLoader (GML) (by matyrobbrt) Fruits Delight (by lcy0x1) Just Enough Breeding (JEBr) (by Christofmeg) Farmer's Respite (by lumpazl) YUNG's API (Forge) (by YUNGNICKYOUNG) Underground Villages (by Mrbysco) Easy Anvils [Forge & Fabric] (by Fuzs) Cupboard (by someaddon) Diagonal Walls (by Fuzs) Large Ore Deposits (by EnderLanky) More Axolotl Variants Mod (by AkashiiKun69) Zeta (by Vazkii) TerraBlender (Forge) (by TheAdubbz) Biomes O' Plenty (by Forstride) Bocchium (by pOtAto__bOy) FramedBlocks (by XFactHD) Patchouli (by Vazkii) Quark Delight (by nocubeyt) Just Enough Resources (JER) (by way2muchnoise) Amendments (by plantspookable) Simple Hats (by fonnymunkey) Oculus (by Asek3) OpenBlocks Elevator (by vsngarcia) YUNG's Better Mineshafts (Forge) (by YUNGNICKYOUNG) Skin Layers 3D (Fabric/Forge) (by tr7zw) Mouse Tweaks (by YaLTeR) YUNG's Extras (Forge) (by YUNGNICKYOUNG)
  • Topics

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.