• 0

    posted a message on can you help me with obfuscation for my client
    Quote from THEREALWEFAN»

    i am not obfuscating a mod or anything to do with forge i am trying to obfuscate a 1.12 hacked client i made for 2b2t


    You mean de-obfuscate? Also I think this might be against the forum rules if your trying to get around blacklisted servers.
    Posted in: Modification Development
  • 0

    posted a message on Model Mesher / Setting BlockState Models Not Working

    I just tried my first attempt but, nope nothing please help and tell me what I am doing wrong. It didn't have any exceptions not sure If It Replaced the Iblockstates but, I think it did. Maybe I need a better refresh method?


    Here is the code:

    https://gist.github.com/jredfox/30af692aa953c164187d3519a6f26f69#file-maincommonmod-java


    LineBase is here and I know it works already tested it.

    https://gist.github.com/jredfox/8630d58f7a16773e9ba44cdfb0718c67

    Posted in: Modification Development
  • 0

    posted a message on Model Mesher / Setting BlockState Models Not Working

    I found these but, I am not sure what either of these are for nor if they can be used to set the blockstates model in any way(returning an obj that could do that or something)


    Minecraft.getMinecraft().getBlockRendererDispatcher();

    Minecraft.getMinecraft().getTextureMapBlocks();


    Wait does forge have it's on model system maybe I could be using that?

    Posted in: Modification Development
  • 0

    posted a message on [Solved]Overriding Forges Registry ~ Help Can't find a way it's Overriding vanilla ArrayLists

    This is supposedly solved in 1.12+

    Posted in: Modification Development
  • 0

    posted a message on Replacing Biome Foliage of Swamp ~ No ASM/Base Class Edits
    Quote from Choonster»
    Failure to comply with the policy won't get you in legal trouble, but some sites like Curse may eventually reject mods that don't comply with it.


    Well There was a file called CoreModLoader in the curse project already and they didn't deny it (technically my class didn't implement the forge asm yet but, they would have said something). Glad to hear it's not a legal issue I won't unpackage the jar since I don't want people literally downloading the same mod 3 separate functions 3 times. Thanks this clears things up alot I don't know why lex just didn't tell me I didn't have to do it that way. I will tell the rest of my team right away to not worry about updating to 1.12 especially since you can't override any Iregistry forge indexes (technically they are called entries or something but, an index is usually used a position)

    World instance as an argument, which implements IBlockAccess


    So the issue is that I wasn't passing the world into all the arguments thanks. It won't be until later versions like 1.12 then that I will be able to override the swamp then.

    Posted in: Modification Development
  • 0

    posted a message on Replacing Biome Foliage of Swamp ~ No ASM/Base Class Edits
    Where are you calling them from?



    I am calling it from the block object. Here I could just show you since I appear to not have made myself clear?

    https://gist.github.com/anonymous/2f8995d6e84041b7d65f8df2db8a49b6


    Your posts are often quite hard to understand and Lex doesn't have a lot of patience


    So they are saying to publicly release it extract the jar of the coremod and compile them separately that's a pain. How are my posts hard to understand? I know I try to be more understandable then the rest of my team.


    Also he kept saying it wasn't a license agreement so what does that mean it's just a suggestion? I mean if it's not an agreement are they making it only forge forums specific?

    Posted in: Modification Development
  • 0

    posted a message on Replacing Biome Foliage of Swamp ~ No ASM/Base Class Edits
    Quote from Choonster»

    Are you overriding or calling these?


    If you're overriding them, you have an IBlockAccess argument.


    If you're calling them, where are you calling them from?



    0xe0ffae is the only water colour used by swamps. This is used as a multiplier of water's default blue colour, it's not displayed directly.



    I am calling these methods but, I don't want to pass in null arguments.


    Forge is directly saying my mod is every violation of what a coremod should be even though that this shouldn't be split up into three different mods
    https://minecraft.curseforge.com/projects/evilnotch-core

    They say no apis and libs if not all is necessary to run the coremod. No it's not all but, I need the apis and util/lib for the rest of my mods and some of them will be using asm helpers if possible like block properties and bnb gaming lib did. I also think it's unnecessary to split up the main common mod as it's function as the mod is suppose to be helping out just no asm like bonemeal events.... He was also completely ignoring anything I had to say maybe you could reason with them?

    So I don't think I could ever be 1.12+

    Posted in: Modification Development
  • 0

    posted a message on [Solved]Overriding Forges Registry ~ Help Can't find a way it's Overriding vanilla ArrayLists

    Overriding Forges Registry ~ Help Can't find a way it's Overriding vanilla ArrayLists.


    net.minecraftforge.fml.common.registry.IForgeRegistryEntry.Impl<Class> . I can't override it there is no indexes I am trying to replace vanilla biomes to fix them up. I also want the ability to replace / delete blocks/items.


    I tried doing this simple test in init

    Biome b = new BiomeOcean((new Biome.BiomeProperties("Ocean")).setBaseHeight(-1.0F).setHeightVariation(0.1F)); Biome.registerBiome(0, "ocean", b);


    Got this Crash:

    https://pastebin.com/Z38TwkYJ

    Posted in: Modification Development
  • 0

    posted a message on porting old biome to 1.10.2 help
    Quote from Choonster»

    In 1.7.10, each index of the Block and byte arrays is used to store the Block and metadata at a specific position.


    In 1.8+, these arrays have been replaced by a ChunkPrimer, which stores the IBlockState at each position instead. Use ChunkPrimer#setBlockState to set the IBlockState at a position.




    So when vanilla's method called chunk primer it's still going to = "block array byte[]" ? Since It's an overridden method. I am confused as to what you are trying to say and how to convert it?

    Posted in: Modification Development
  • 0

    posted a message on Replacing Biome Foliage of Swamp ~ No ASM/Base Class Edits

    If you don't have an explicit IBlockAccess[/i] argument, you'll usually have a World[/i] argument/field. World[/i] implements IBlockAccess[/i].

    Where do you need this?

    block.isAir and Block.isLeaves



    Biome#getWaterColor[/i] uses the Biome#waterColor[/i] field, which is set in the constructor from the Biome.BiomeProperties[/i]argument. Looking at the Biome.registerBiomes[/i] method, Biomes.SWAMPLAND[/i] uses 14745518 (0xe0ffae) for the water colour.

    I already had this in my constructor and it wasn't even mildly green even when I set the swamp foliage config to it's default noise generator foliage. There is another value hard coded somehwere else like either in the water class or minecraft just like pine and birch leaves?

    Posted in: Modification Development
  • 0

    posted a message on Replacing Biome Foliage of Swamp ~ No ASM/Base Class Edits

    Ok got feild finally but, not same crash as earlier it's recursivly calling itself


    @Override
    	public int colorMultiplier(IBlockState state, IBlockAccess worldIn, BlockPos pos, int tintIndex) 
    	{
    		if(pos == null)
    			return FeildsAccess.BlockColor.get(state.getBlock().delegate).colorMultiplier(state, worldIn, pos, tintIndex);
    		Biome biome = worldIn.getBiome(pos);
    		if(biome instanceof BiomeSwamp)
    		{
    			double d0 = (double)MathHelper.clamp_float(biome.getFloatTemperature(pos), 0.0F, 1.0F);
    	        double d1 = (double)MathHelper.clamp_float(biome.getRainfall(), 0.0F, 1.0F);
    	        return biome.getModdedBiomeGrassColor(ColorizerGrass.getGrassColor(d0, d1));
    			//return 64537;
    		}
    		else
    			return FeildsAccess.BlockColor.get(state.getBlock().getRegistryName()).colorMultiplier(state, worldIn, pos, tintIndex);
    	}[mod][/mod]


    Edit: So I gave up on this and just use inventory code you gave me and biome gen foliage if is not swamp.


    Basically I am trying to port 1.7.10 swamp now to 1.10.2 and my freind was no help. I need to know how to convert generate terrain method since it uses chunk primers, I also need to know how to get IBlockAccess from an object since I need to know if the block is air.


    I also need to know where the swamp hard coded water color is because the 1.7.10 multiplier value once I overrode it with the same value was no longer the same color


    I plan on no longer using IBlockColor and just replacing the swamp biome entirely with either the new one or the old one based on the config so no need for IBlock colors soon. I have confirmed though that the biome grass and foilage event didn't work for the swamp nor on birch/pine leaves

    Posted in: Modification Development
  • 0

    posted a message on Replacing Biome Foliage of Swamp ~ No ASM/Base Class Edits

    Doesn't seem to be working


    On Startup:

    https://pastebin.com/jhLLuF6s


    In cache private feilds


    public class FeildsAccess {
    	
    	public static java.util.Map<net.minecraftforge.fml.common.registry.RegistryDelegate, IBlockColor> BlockColor; 
    	
    	
    	public static void CachePrivateFeilds()
    	{
    		//Try and Catch for all fields there should be no exceptions in a de-obfuscated environment 
    		try {
    			BlockColor = (java.util.Map<net.minecraftforge.fml.common.registry.RegistryDelegate, IBlockColor>)ReflectionHelper.findField(BlockColors.class, MCPMappings.getFeildName(MainCommonMod.isEclipse, "blockColorMap") ).get(null);
    		} 
    		catch (Exception e) {e.printStackTrace();}
    	}
    
    }

    In foilage and grass handlers

     @Override
     public int colorMultiplier(IBlockState state, IBlockAccess worldIn, BlockPos pos, int tintIndex) 
     {
     if(pos == null)
     return FeildsAccess.BlockColor.get(state.getBlock().getRegistryName()).colorMultiplier(state, worldIn, pos, tintIndex);
     Biome biome = worldIn.getBiome(pos);
     if(biome instanceof BiomeSwamp)
     {
     double d0 = (double)MathHelper.clamp_float(biome.getFloatTemperature(pos), 0.0F, 1.0F);
     double d1 = (double)MathHelper.clamp_float(biome.getRainfall(), 0.0F, 1.0F);
     return biome.getModdedBiomeFoliageColor(ColorizerFoliage.getFoliageColor(d0, d1));
     }
     return FeildsAccess.BlockColor.get(state.getBlock().getRegistryName()).colorMultiplier(state, worldIn, pos, tintIndex);
     }
    Posted in: Modification Development
  • 0

    posted a message on Replacing Biome Foliage of Swamp ~ No ASM/Base Class Edits
    There's no public method to get an existing IBlockColor instance, so you'll need to use reflection to access BlockColors.blockColorMap and get the IBlockColor from there.


    No Idea how I am suppose to do omce I got here

    public final RegistryDelegate<T> delegate = PersistentRegistryManager.makeDelegate((T)this, (Class<T>)token.getRawType());


    if this is how I get the key then do I need another key to get this key?

    Posted in: Modification Development
  • 0

    posted a message on Replacing Biome Foliage of Swamp ~ No ASM/Base Class Edits
    calling IBlockColor#colorMultiplier and returning the result) when the Biome isn't an instance of BiomeSwamp (or the World/BlockPos are null). This will allow you to use the vanilla colours for the inventory or other biomes and preserve the changes made by any other mod's IBlockColor.



    This code caused a crash I could only call it as an Obj since it's an object method:

    https://pastebin.com/eZmH47PT (Line 28 is the last return statement)


    	@Override
    	public int colorMultiplier(IBlockState state, IBlockAccess worldIn, BlockPos pos, int tintIndex) 
    	{
    		if(pos == null)
    			return this.colorMultiplier(state, worldIn, pos, tintIndex);
    		Biome biome = worldIn.getBiome(pos);
    		if(biome instanceof BiomeSwamp)
    		{
    		     double d0 = (double)MathHelper.clamp_float(biome.getFloatTemperature(pos), 0.0F, 1.0F);
    		     double d1 = (double)MathHelper.clamp_float(biome.getRainfall(), 0.0F, 1.0F);
    		     return biome.getModdedBiomeFoliageColor(ColorizerFoliage.getFoliageColor(d0, d1));
    		}
    		return this.colorMultiplier(state, worldIn, pos, tintIndex);
    	}

    Otherwise I don't know how I am suppose to store the I block colors rather then an array list from calling it previously and also would have to do 0-5 tint indexes as well since it's faces? I can't call super this? In my client proxy I dynamically get the blocks/Items for the swamp...


     @Override
     public void init()
     {
     if(!Config.betaSwampGrass)
     return;
     Iterator it = MainCommonMod.mc_blocks.iterator();
     while(it.hasNext())
     {
     Block b = (Block) it.next();
     Material mat = b.getMaterial(b.getDefaultState());
     if(mat == Material.GRASS || mat == Material.VINE && !(b instanceof BlockVine) || b instanceof BlockReed)
     Minecraft.getMinecraft().getBlockColors().registerBlockColorHandler(new GrasColor(), b);
     if(b instanceof BlockVine || mat == Material.LEAVES)
     Minecraft.getMinecraft().getBlockColors().registerBlockColorHandler(new FoilageColor(), b);
     }
     }

    Posted in: Modification Development
  • 0

    posted a message on Model Mesher / Setting BlockState Models Not Working

    I am looking for a way to set a new resource model location thing to a blockstate not in the inventory. I only see a way with getting item model mesher which only works for the items in the inventory. I need this so for my api so I can simply set a block as if the texture/model has changed.


    update:

    I just tried my first attempt but, nope nothing please help and tell me what I am doing wrong. It didn't have any exceptions not sure If It Replaced the Iblockstates but, I think it did. Maybe I need a better refresh method?


    Here is the code:

    https://gist.github.com/jredfox/30af692aa953c164187d3519a6f26f69#file-maincommonmod-java


    LineBase is here and I know it works already tested it.

    https://gist.github.com/jredfox/8630d58f7a16773e9ba44cdfb0718c67

    Posted in: Modification Development
  • To post a comment, please or register a new account.