Jump to content

[1.7.10] Help with getting raw texture data


SuperKael

Recommended Posts

I am trying to determine the "average color" of a texture, for various purposes, and I have everything figured out except, I need some way to get the texture of an item the form of an Image, Int[], or Int[][]. I am completely stumped, it seems like the Minecraft source code somehow never manages to actually reference images anywhere in the code. it just uses IIcons and and TextureMaps, and I simply can't figure it out. In order to obtain said texture, I have access to IIcons, the string name, etc. Someone please tell me how I can accomplish this.

If I ever say something stupid, or simply incorrect, please excuse me. I don't know anything about 1.8 modding, and I don't know much about entities either, But I try to help when I can.

Link to comment
Share on other sites

I was trying to do that (for blocks) months ago and never figured it out.  I specifically wanted to pre-multiply two icons so they could be rendered and have correct particles, but gave up and did it as two passes (and have transparent particles).

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Sadly, that won't work for me. I am trying to make "universal tools" that can be made from anything. say, an emerald pickaxe. it needs to dynamicaly determine that emeralds are green, and such make the head of the pickaxe look green. I have everything set up, I just need the raw texture :/

If I ever say something stupid, or simply incorrect, please excuse me. I don't know anything about 1.8 modding, and I don't know much about entities either, But I try to help when I can.

Link to comment
Share on other sites

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Sorry for the late reply. I am aware of this, my pickaxe actually uses 5 passes for each part of it to be rendered individually.

If I ever say something stupid, or simply incorrect, please excuse me. I don't know anything about 1.8 modding, and I don't know much about entities either, But I try to help when I can.

Link to comment
Share on other sites

The raw textures are inserted into a single texture sheet during initialisation, and after that the Icon just tells the coordinates of the rectangular part of the large texture sheet that corresponds to that item.  For example the pickaxe might occupy the rectangle from [u=0.3, v = 0.1] to [u=0.4, v=0.2]

 

So I think there are two ways you can go - either extract the texture name from the Item's model and reload it from the file, or use OpenGL to render the relevant part of the texture sheet into a FrameBufferObject and read it back out.

 

I've never done it myself but a quick google shows up keywords like PixelBufferObject, glReadPixels that seem suitable.  It will be tricky unless you know a bit about OpenGL, I think.

 

-TGG

Link to comment
Share on other sites

The raw textures are inserted into a single texture sheet during initialisation, and after that the Icon just tells the coordinates of the rectangular part of the large texture sheet that corresponds to that item.

 

Yes, but that large texture sheet isn't referenced by anything anywhere.  Well, it probably is, but it's buried so deep that I have never been able to find it.

 

As for dealing with OGL, once you have raw pixel data, it's not too bad.  I did this by operating on the raw bitmap data (arrays of integers).  I actually utilized some code from that project for a block I'm working on, as I wanted to simulate rock fracture planes better than destroyed/not destroyed from explosions.  So I snagged the 2D line-drawing code from that project, converted it to handle 3D, and did the research for the 3D rotation of an arbitrary vector around another arbitrary vector (so I could draw 3D lines that went from the destroyed block, away from the explosion, but at a random angular offset).

 

Anyway, towards this problem:

either extract the texture name from the Item's model and reload it from the file, or use OpenGL to render the relevant part of the texture sheet into a FrameBufferObject and read it back out

 

Neither will do much good if we can't save the data back into the texture sheet.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

I think the FrameBufferObject may be the way to go. Because I don't need to write back onto the texture sheet. after looking at the code for spawn eggs, I can give a color tint to the texture on a pass-by-pass basis, so I just make grayscale template images, and color them like so.

If I ever say something stupid, or simply incorrect, please excuse me. I don't know anything about 1.8 modding, and I don't know much about entities either, But I try to help when I can.

Link to comment
Share on other sites

The raw textures are inserted into a single texture sheet during initialisation, and after that the Icon just tells the coordinates of the rectangular part of the large texture sheet that corresponds to that item.

 

Yes, but that large texture sheet isn't referenced by anything anywhere.  Well, it probably is, but it's buried so deep that I have never been able to find it.

The texture is stored in OpenGL, not as an integer array any more.  The texture index is stored in TextureMap.mapTextureObjects and is accessed using

        this.mc.getTextureManager().bindTexture(TextureMap.locationBlocksTexture);

See for example

SimpleTexture.loadTexture() and TextureMap.loadTextureAtlas() (for the stitched-together block textures)

 

either extract the texture name from the Item's model and reload it from the file, or use OpenGL to render the relevant part of the texture sheet into a FrameBufferObject and read it back out

 

Neither will do much good if we can't save the data back into the texture sheet.

This is very easy to do with  DynamicTexture, for example this snippet which stores custom texture info for all six faces for a list of custom blocks

 

public class SelectionBlockTextures {


  public SelectionBlockTextures(TextureManager i_textureManager)
  {
    textureManager = i_textureManager;
    final int BLOCK_COUNT = 1;
    final int NUMBER_OF_FACES_PER_BLOCK = 6;
    final int U_TEXELS_PER_FACE = 16;
    final int V_TEXELS_PER_FACE = 16;
    int textureWidthTexels = BLOCK_COUNT * U_TEXELS_PER_FACE;
    int textureHeightTexels = NUMBER_OF_FACES_PER_BLOCK * V_TEXELS_PER_FACE;
    TEXELHEIGHTPERFACE = 1.0 / NUMBER_OF_FACES_PER_BLOCK;
    TEXELWIDTHPERBLOCK = 1.0 / BLOCK_COUNT;

    blockTextures = new DynamicTexture(textureWidthTexels, textureHeightTexels);
    textureResourceLocation = textureManager.getDynamicTextureLocation("SelectionBlockTextures", blockTextures);

    // just for now, initialise texture to all white
    // todo make texturing properly
    int [] rawTexture = blockTextures.getTextureData();

    for (int i = 0; i < rawTexture.length; ++i) {
      rawTexture[i] = Color.WHITE.getRGB();
    }

    blockTextures.updateDynamicTexture();
  }

  public void bindTexture() {
    textureManager.bindTexture(textureResourceLocation);
  }

  public SBTIcon getSBTIcon(IBlockState iBlockState, EnumFacing whichFace)
  {
    double umin = 0.0;
    double vmin = 0.0;
    return new SBTIcon(umin, umin + TEXELWIDTHPERBLOCK, vmin, vmin + TEXELHEIGHTPERFACE);
  }

  private final DynamicTexture blockTextures;
  private final ResourceLocation textureResourceLocation;
  private final TextureManager textureManager;
  private final double TEXELWIDTHPERBLOCK;
  private final double TEXELHEIGHTPERFACE;

  public class SBTIcon
  {
    public SBTIcon(double i_umin, double i_umax, double i_vmin, double i_vmax)
    {
      umin = i_umin;
      umax = i_umax;
      vmin = i_vmin;
      vmax = i_vmax;
    }

    public double getMinU() {
      return umin;
    }

    public double getMaxU() {
      return umax;
    }

    public double getMinV() {
      return vmin;
    }

    public double getMaxV() {
      return vmax;
    }

    private double umin;
    private double umax;
    private double vmin;
    private double vmax;
  }

}

 

-TGG

Link to comment
Share on other sites

  • 3 weeks later...

A Quick followup on how it went. I got it working! I didn't use FrameBufferObject or any of what you guys where suggesting, but you DID get me looking into LWJGL and OpenGL, and in the process I found my solution.

 

public int getAverageColor(ItemStack item){
	TextureAtlasSprite tas = (TextureAtlasSprite)item.getIconIndex();
	ByteBuffer pixels = BufferUtils.createByteBuffer(Math.max(tas.getIconWidth() * tas.getIconHeight(),1024));
	//if(Block.getBlockFromItem(item.getItem()) == Blocks.air){
		GL11.glReadPixels(tas.getOriginX(), tas.getOriginY(), tas.getIconWidth(), tas.getIconHeight(), GL11.GL_RGBA, GL11.GL_BYTE, pixels);
	//}
	byte[] texture = new byte[pixels.remaining()];
	pixels.get(texture);
	//BufferedImage bufimage = new BufferedImage(texture.length, texture.length, BufferedImage.TYPE_INT_ARGB);
	int r = 0,g = 0,b = 0;
	for (int i = 0; i < Math.sqrt(texture.length); i++) {
        for (int j = 0; j < Math.sqrt(texture.length); j++) {
            byte pixel = texture[(i + (j * tas.getIconWidth()))];
            Color color = new Color(pixel);
            r += color.getRed();
            g += color.getGreen();
            b += color.getBlue();
        }
    }
	r /= texture.length;
	g /= texture.length;
	b /= texture.length;
	return new Color(r,g,b).getRGB();
}

Thanks for all your help!

If I ever say something stupid, or simply incorrect, please excuse me. I don't know anything about 1.8 modding, and I don't know much about entities either, But I try to help when I can.

Link to comment
Share on other sites

Nice!  Do you call this every time the item is rendered, or does it need to be done just once?

Actually your code would only need to run once, you're just trying to get an average color (that doesn't change).  But if I were to alter the pixel data, would it have to be done repeatedly?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Ok, turns out it doesn't QUITE work... for some reason it's referencing the lightmap instead of the texturemap, resulting in an item that is flashing various different colors... but yes, it would need to be re-called whenever the pixel data where to change.

If I ever say something stupid, or simply incorrect, please excuse me. I don't know anything about 1.8 modding, and I don't know much about entities either, But I try to help when I can.

Link to comment
Share on other sites

Ok, turns out it doesn't QUITE work... for some reason it's referencing the lightmap instead of the texturemap, resulting in an item that is flashing various different colors... but yes, it would need to be re-called whenever the pixel data where to change.

 

I meant that if I wanted to use that code to change the pixel data, would it cache?

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

well no, because not only does the above code not work, but even so, it was set up to work entirely read-only. Although, I did finally make working code! (this time I did proper testing xD) sadly, this version actually accesses the texture files from the file system, which is not what I wanted... but it will do.

 

public int getAverageColor(ItemStack item){
	InputStream is;
	BufferedImage image;
	try {
		UniqueIdentifier UID = GameRegistry.findUniqueIdentifierFor(item.getItem());
		String itemID;
		if(Block.getBlockFromItem(item.getItem()).equals(Blocks.air)){
			itemID = UID.modId + ":textures/items/" + UID.name + ".png";
		}else{
			itemID = UID.modId + ":textures/blocks/" + UID.name + ".png";
		}
		is = Minecraft.getMinecraft().getResourceManager().getResource((new ResourceLocation(itemID))).getInputStream();
	    image = ImageIO.read(is);
	}catch(IOException e){e.printStackTrace();return 0;}
	int[] texture = new int[image.getWidth() * image.getHeight() * 4];
	texture = image.getRaster().getPixels(image.getRaster().getMinX(), image.getRaster().getMinY(), image.getRaster().getWidth(), image.getRaster().getHeight(), texture);
	int r = 0,g = 0,b = 0;
	int rloops = 0,gloops = 0,bloops = 0;
	for (int i = 0; i < texture.length; i++) {
		try{
			if(((float)i / 4) * 4 == i && texture[i + 3] >= 255){
				r += texture[i];
				rloops++;
			}
			if(((float)(i - 1) / 4) * 4 == i - 1 && texture[i + 2] >= 255){
				g += texture[i];
				gloops++;
			}
			if(((float)(i - 2) / 4) * 4 == i - 2 && texture[i + 1] >= 255){
				b += texture[i];
				bloops++;
			}
		}catch(Exception e){}
    }
	try{
		r /= rloops;
		g /= gloops;
		b /= bloops;
	}catch(Exception e){}
	return new Color(r,g,b).getRGB();
}

 

As for you plan, you could technically change the pixel data as it's looping, although you would need to add some way to do that dynamically. and yes, if you ever made such a change, you would have to make sure you re-call the method in order to get the result.

If I ever say something stupid, or simply incorrect, please excuse me. I don't know anything about 1.8 modding, and I don't know much about entities either, But I try to help when I can.

Link to comment
Share on other sites

Kind of why I was hoping to be able to "precompute" the icons so the alpha multiplication step can be skipped.  Oh well.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

  • 6 months later...

(Was this really back from April?  Wow.  No wonder it took me a while to locate the thread.)

 

Woo, I got a block texture that's pre-computed!  It takes two icon registration strings and reads the files directly, doing alpha-multiplication.  Not bad for 1 day's work.

 

package com.draco18s.texturetest.client;

import java.awt.Color;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Type;

import javax.imageio.ImageIO;

import com.draco18s.texturetest.TextureTestMain;
import com.google.common.collect.Lists;

import net.minecraft.client.Minecraft;
import net.minecraft.client.renderer.texture.DynamicTexture;
import net.minecraft.client.renderer.texture.TextureAtlasSprite;
import net.minecraft.client.renderer.texture.TextureMap;
import net.minecraft.client.renderer.texture.TextureUtil;
import net.minecraft.client.resources.IResourceManager;
import net.minecraft.client.resources.data.AnimationMetadataSection;
import net.minecraft.util.IIcon;
import net.minecraft.util.ResourceLocation;

public class TextureAtlasDynamic extends TextureAtlasSprite {
protected String textureBase;
protected String textureOverlay;

public TextureAtlasDynamic(String p_i1282_1_, String base, String overlay) {
	super(p_i1282_1_);
	textureBase = base;
	textureOverlay = overlay;
}

@Override
public void updateAnimation() {
	TextureUtil.uploadTextureMipmap((int[][])this.framesTextureData.get(0), this.width, this.height, this.originX, this.originY, false, false);
}

@Override
public boolean hasCustomLoader(IResourceManager manager, ResourceLocation location) {
        return true;
    }

@Override
    public boolean load(IResourceManager manager, ResourceLocation location) {
	framesTextureData.clear();
        //this.setFramesTextureData(Lists.newArrayList());
        this.frameCounter = 0;
        this.tickCounter = 0;
        
        //int [] rawTexture = icon.getTextureData();
        
        //IResourceManager manager = Minecraft.getMinecraft().getResourceManager();
        try {
        	ResourceLocation resource1 = new ResourceLocation(textureBase);
        	ResourceLocation resource2 = new ResourceLocation(textureOverlay);
        	TextureMap map = Minecraft.getMinecraft().getTextureMapBlocks();
        	resource1 = this.completeResourceLocation(map, resource1, 0);
        	resource2 = this.completeResourceLocation(map, resource2, 0);
		BufferedImage buff = ImageIO.read(manager.getResource(resource1).getInputStream());
		BufferedImage buff2 = ImageIO.read(manager.getResource(resource2).getInputStream());

        width = buff.getWidth();
        height = buff.getHeight();

        int[] rawBase = new int[buff.getWidth()*buff.getHeight()];
        int[] rawOverlay = new int[buff2.getWidth()*buff2.getHeight()];

        buff.getRGB(0, 0, buff.getWidth(), buff.getHeight(), rawBase, 0, buff.getWidth());
        buff2.getRGB(0, 0, buff2.getWidth(), buff2.getHeight(), rawOverlay, 0, buff2.getWidth());
        
        int min = Math.min(buff.getWidth(),buff2.getWidth());
        rawBase = scaleToSmaller(rawBase, buff.getWidth(), min);
        rawOverlay = scaleToSmaller(rawOverlay, buff2.getWidth(), min);
        
        int r1,g1,b1;
        int r2,g2,b2;
        float a1,a2,a3;
        for(int p=0; p<rawBase.length;p++) {
        	//perform alpha blending
        	Color c1 = new Color(rawBase[p],true);
        	Color c2 = new Color(rawOverlay[p],true);
        	
        	a1 = c1.getAlpha()/255f;
        	r1 = c1.getRed();
        	g1 = c1.getGreen();
        	b1 = c1.getBlue();
        	a2 = c2.getAlpha()/255f;
        	r2 = c2.getRed();
        	g2 = c2.getGreen();
        	b2 = c2.getBlue();
        	a3 = a2+a1*(1-a2);
        	
        	if(a3 > 0) {
	        	r1 = Math.round(((r2*a2)+(r1*a1*(1-a2)))/a3);
	        	g1 = Math.round(((g2*a2)+(g1*a1*(1-a2)))/a3);
	        	b1 = Math.round(((b2*a2)+(b1*a1*(1-a2)))/a3);
        	}
        	else {
        		r1 = g1 = b1 = 0;
        	}
        	Color c3 = new Color(r1,g1,b1,Math.round(a3*255));
        	rawBase[p] = c3.getRGB();
        	//rawBase[p] = (rawBase[p] + rawOverlay[p])/2;
        }
        
        int[][] aint = new int[1 + MathHelper.calculateLogBaseTwo(min)][];
        for (int k = 0; k < aint.length; ++k)
        {
        	aint[k] = rawBase;
        }

        this.framesTextureData.add(aint);
	} catch (IOException e) {
		e.printStackTrace();
	}
        return false;
    }
/** Scale the larger icon to the same size as the smaller, using no interpolation.  This is "good enough" to accommodate most resource packs.
* Alternatively could scale up in the same manner.
* width and min should be multiples (dividing evenly) due to the power-of-2 rule.
*/
    private int[] scaleToSmaller(int[] data, int width, int min) {
	if(width == min) { return data; }
	int scale = width / min;
	int[] output = new int[min*min];
	int j = 0;
	for(int i = 0; i < output.length; i++) {
		if(i%min == 0) {
			j += width;
		}
		output[i] = data[i*scale+j];
	}
	return output;
}

/** Wrapper to access the TextureMap private method.
*/
private ResourceLocation completeResourceLocation(TextureMap map, ResourceLocation loc, int c) {
        try {
		return (ResourceLocation)TextureTestMain.proxy.resourceLocation.invoke(map, loc, c);
	} catch (IllegalAccessException e) {
		e.printStackTrace();
	} catch (IllegalArgumentException e) {
		e.printStackTrace();
	} catch (InvocationTargetException e) {
		e.printStackTrace();
	}
        return null;
    }
}

 

There's a bit of reflection necessary to turn "modid:texture" into a proper directory listing, which I do in the client proxy.  This finds and saves a reference to the private

completeResourceLocation

method of TextureMap.

	public void init() {
	Class clz = TextureMap.class;
	Method[] meths = clz.getDeclaredMethods();
	for(Method m : meths) {
		if(m.getReturnType() == ResourceLocation.class) {
			m.setAccessible(true);
			resourceLocation = m;
		}
	}
}

 

And block registration:

 

	@Override
@SideOnly(Side.CLIENT)
public void registerBlockIcons(IIconRegister iconRegister) {
	if(iconRegister instanceof TextureMap) {
		TextureMap map = (TextureMap)iconRegister;
		map.setTextureEntry("texturetest:test", new TextureAtlasDynamic("texturetest:test",Blocks.stone.getIcon(0, 0).getIconName(),"texturetest:stone_overlay_13"));
		blockIcon = map.getTextureExtry("texturetest:test");
	}
}

 

width=800 height=449http://s12.postimg.org/pks9kuty5/2015_10_13_22_58_48.png[/img]

 

No more transparent particles!

Left is the custom block, right is vanilla cobblestone.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

  • 3 years later...

Haha, how fun. I just managed to stumble across my own thread in a google search. Congrats on figuring out what you were doing, but man, but own code now disgusts me. I was wrapping divisions in try/catch to deal with divide by zeros... blegh. I sure have come a long way in the past few years :D. Oh, and sorry for the bit of thread necromancy, this thread just brought back a lot of memories.

If I ever say something stupid, or simply incorrect, please excuse me. I don't know anything about 1.8 modding, and I don't know much about entities either, But I try to help when I can.

Link to comment
Share on other sites

  • Guest locked this topic
Guest
This topic is now closed to further replies.

Announcements



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • Hello, I'm trying to modify the effects of native enchantments for bows and arrows in Minecraft. After using a decompilation tool, I found that the specific implementations of native bow and arrow enchantments (including `ArrowDamageEnchantment`, `ArrowKnockbackEnchantment`, `ArrowFireEnchantment`, `ArrowInfiniteEnchantment`, `ArrowPiercingEnchantment`) do not contain any information about the enchantment effects (such as the `getDamageProtection` function for `ProtectionEnchantment`, `getDamageBonus` function for `DamageEnchantment`, etc.). Upon searching for the base class of arrows, `AbstractArrow`, I found a function named setEnchantmentEffectsFromEntity`, which seems to be used to retrieve the enchantment levels of the tool held by a `LivingEntity` and calculate the specific values of the enchantment effects. However, after testing with the following code, I found that this function is not being called:   @Mixin(AbstractArrow.class) public class ModifyArrowEnchantmentEffects {     private static final Logger LOGGER = LogUtils.getLogger();     @Inject(         method = "setEnchantmentEffectsFromEntity",         at = @At("HEAD")     )     private void logArrowEnchantmentEffectsFromEntity(CallbackInfo ci) {         LOGGER.info("Arrow enchantment effects from entity");     } }   Upon further investigation, I found that within the onHitEntity method, there are several lines of code:               if (!this.level().isClientSide &amp;&amp; entity1 instanceof LivingEntity) {                EnchantmentHelper.doPostHurtEffects(livingentity, entity1);                EnchantmentHelper.doPostDamageEffects((LivingEntity)entity1, livingentity);             }   These lines of code actually call the doPostHurt and doPostAttack methods of each enchantment in the enchantment list. However, this leads back to the issue because native bow and arrow enchantments do not implement these functions. Although their base class defines the functions, they are empty. At this point, I'm completely stumped and seeking assistance. Thank you.
    • I have been trying to make a server with forge but I keep running into an issue. I have jdk 22 installed as well as Java 8. here is the debug file  
    • it crashed again     What the console says : [00:02:03] [Server thread/INFO] [Easy NPC/]: [EntityManager] Server started! [00:02:03] [Server thread/INFO] [co.gi.al.ic.IceAndFire/]: {iceandfire:fire_dragon_roost=true, iceandfire:fire_lily=true, iceandfire:spawn_dragon_skeleton_fire=true, iceandfire:lightning_dragon_roost=true, iceandfire:spawn_dragon_skeleton_lightning=true, iceandfire:ice_dragon_roost=true, iceandfire:ice_dragon_cave=true, iceandfire:lightning_dragon_cave=true, iceandfire:cyclops_cave=true, iceandfire:spawn_wandering_cyclops=true, iceandfire:spawn_sea_serpent=true, iceandfire:frost_lily=true, iceandfire:hydra_cave=true, iceandfire:lightning_lily=true, iceandfireixie_village=true, iceandfire:myrmex_hive_jungle=true, iceandfire:myrmex_hive_desert=true, iceandfire:silver_ore=true, iceandfire:siren_island=true, iceandfire:spawn_dragon_skeleton_ice=true, iceandfire:spawn_stymphalian_bird=true, iceandfire:fire_dragon_cave=true, iceandfire:sapphire_ore=true, iceandfire:spawn_hippocampus=true, iceandfire:spawn_death_worm=true} [00:02:03] [Server thread/INFO] [co.gi.al.ic.IceAndFire/]: {TROLL_S=true, HIPPOGRYPH=true, AMPHITHERE=true, COCKATRICE=true, TROLL_M=true, DREAD_LICH=true, TROLL_F=true} [00:02:03] [Server thread/INFO] [ne.be.lo.WeaponRegistry/]: Encoded Weapon Attribute registry size (with package overhead): 41976 bytes (in 5 string chunks with the size of 10000) [00:02:03] [Server thread/INFO] [patchouli/]: Sending reload packet to clients [00:02:03] [Server thread/WARN] [voicechat/]: [voicechat] Running in offline mode - Voice chat encryption is not secure! [00:02:03] [VoiceChatServerThread/INFO] [voicechat/]: [voicechat] Using server-ip as bind address: 0.0.0.0 [00:02:03] [Server thread/WARN] [ModernFix/]: Dedicated server took 22.521 seconds to load [00:02:03] [VoiceChatServerThread/INFO] [voicechat/]: [voicechat] Voice chat server started at 0.0.0.0:25565 [00:02:03] [Server thread/WARN] [minecraft/SynchedEntityData]: defineId called for: class net.minecraft.world.entity.player.Player from class tschipp.carryon.common.carry.CarryOnDataManager [00:02:03] [Server thread/INFO] [ne.mi.co.AdvancementLoadFix/]: Using new advancement loading for net.minecraft.server.PlayerAdvancements@2941ffd5 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 0 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 1 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 2 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 3 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 4 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 5 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 6 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 7 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 8 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 9 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 10 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 11 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 12 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 13 [00:02:10] [Netty Epoll Server IO #2/INFO] [Calio/]: Received acknowledgment for login packet with id 14 [00:02:19] [Server thread/INFO] [ne.mi.co.AdvancementLoadFix/]: Using new advancement loading for net.minecraft.server.PlayerAdvancements@ebc7ef2 [00:02:19] [Server thread/INFO] [minecraft/PlayerList]: ZacAdos[/90.2.17.162:49242] logged in with entity id 1062 at (-1848.6727005281205, 221.0, -3054.2468255848935) [00:02:19] [Server thread/ERROR] [ModernFix/]: Skipping entity ID sync for com.talhanation.smallships.world.entity.ship.Ship: java.lang.NoClassDefFoundError: net/minecraft/client/CameraType [00:02:19] [Server thread/INFO] [minecraft/MinecraftServer]: - Gloop - ZacAdos joined the game [00:02:19] [Server thread/INFO] [xa.pa.OpenPartiesAndClaims/]: Updating all forceload tickets for cc56befd-d376-3526-a760-340713c478bd [00:02:19] [Server thread/INFO] [se.mi.te.da.DataManager/]: Sending data to client: ZacAdos [00:02:19] [Server thread/INFO] [voicechat/]: [voicechat] Received secret request of - Gloop - ZacAdos (17) [00:02:19] [Server thread/INFO] [voicechat/]: [voicechat] Sent secret to - Gloop - ZacAdos [00:02:21] [VoiceChatPacketProcessingThread/INFO] [voicechat/]: [voicechat] Successfully authenticated player cc56befd-d376-3526-a760-340713c478bd [00:02:22] [VoiceChatPacketProcessingThread/INFO] [voicechat/]: [voicechat] Successfully validated connection of player cc56befd-d376-3526-a760-340713c478bd [00:02:22] [VoiceChatPacketProcessingThread/INFO] [voicechat/]: [voicechat] Player - Gloop - ZacAdos (cc56befd-d376-3526-a760-340713c478bd) successfully connected to voice chat stop [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Stopping the server [00:02:34] [Server thread/INFO] [mo.pl.ar.ArmourersWorkshop/]: stop local service [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Stopping server [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving players [00:02:34] [Server thread/INFO] [minecraft/ServerGamePacketListenerImpl]: ZacAdos lost connection: Server closed [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: - Gloop - ZacAdos left the game [00:02:34] [Server thread/INFO] [xa.pa.OpenPartiesAndClaims/]: Updating all forceload tickets for cc56befd-d376-3526-a760-340713c478bd [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving worlds [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[world]'/minecraft:overworld [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_end [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: Saving chunks for level 'ServerLevel[world]'/minecraft:the_nether [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage (world): All chunks are saved [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage (DIM1): All chunks are saved [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage (DIM-1): All chunks are saved [00:02:34] [Server thread/INFO] [minecraft/MinecraftServer]: ThreadedAnvilChunkStorage: All dimensions are saved [00:02:34] [Server thread/INFO] [xa.pa.OpenPartiesAndClaims/]: Stopping IO worker... [00:02:34] [Server thread/INFO] [xa.pa.OpenPartiesAndClaims/]: Stopped IO worker! [00:02:34] [Server thread/INFO] [Calio/]: Removing Dynamic Registries for: net.minecraft.server.dedicated.DedicatedServer@7dc879e1 [MineStrator Daemon]: Checking server disk space usage, this could take a few seconds... [MineStrator Daemon]: Updating process configuration files... [MineStrator Daemon]: Ensuring file permissions are set correctly, this could take a few seconds... [MineStrator Daemon]: Pulling Docker container image, this could take a few minutes to complete... [MineStrator Daemon]: Finished pulling Docker container image container@pterodactyl~ java -version openjdk version "17.0.10" 2024-01-16 OpenJDK Runtime Environment Temurin-17.0.10+7 (build 17.0.10+7) OpenJDK 64-Bit Server VM Temurin-17.0.10+7 (build 17.0.10+7, mixed mode, sharing) container@pterodactyl~ java -Xms128M -Xmx6302M -Dterminal.jline=false -Dterminal.ansi=true -Djline.terminal=jline.UnsupportedTerminal -p libraries/cpw/mods/bootstraplauncher/1.1.2/bootstraplauncher-1.1.2.jar:libraries/cpw/mods/securejarhandler/2.1.4/securejarhandler-2.1.4.jar:libraries/org/ow2/asm/asm-commons/9.5/asm-commons-9.5.jar:libraries/org/ow2/asm/asm-util/9.5/asm-util-9.5.jar:libraries/org/ow2/asm/asm-analysis/9.5/asm-analysis-9.5.jar:libraries/org/ow2/asm/asm-tree/9.5/asm-tree-9.5.jar:libraries/org/ow2/asm/asm/9.5/asm-9.5.jar:libraries/net/minecraftforge/JarJarFileSystems/0.3.16/JarJarFileSystems-0.3.16.jar --add-modules ALL-MODULE-PATH --add-opens java.base/java.util.jar=cpw.mods.securejarhandler --add-opens java.base/java.lang.invoke=cpw.mods.securejarhandler --add-exports java.base/sun.security.util=cpw.mods.securejarhandler --add-exports jdk.naming.dns/com.sun.jndi.dns=java.naming -Djava.net.preferIPv6Addresses=system -DignoreList=bootstraplauncher-1.1.2.jar,securejarhandler-2.1.4.jar,asm-commons-9.5.jar,asm-util-9.5.jar,asm-analysis-9.5.jar,asm-tree-9.5.jar,asm-9.5.jar,JarJarFileSystems-0.3.16.jar -DlibraryDirectory=libraries -DlegacyClassPath=libraries/cpw/mods/securejarhandler/2.1.4/securejarhandler-2.1.4.jar:libraries/org/ow2/asm/asm/9.5/asm-9.5.jar:libraries/org/ow2/asm/asm-commons/9.5/asm-commons-9.5.jar:libraries/org/ow2/asm/asm-tree/9.5/asm-tree-9.5.jar:libraries/org/ow2/asm/asm-util/9.5/asm-util-9.5.jar:libraries/org/ow2/asm/asm-analysis/9.5/asm-analysis-9.5.jar:libraries/net/minecraftforge/accesstransformers/8.0.4/accesstransformers-8.0.4.jar:libraries/org/antlr/antlr4-runtime/4.9.1/antlr4-runtime-4.9.1.jar:libraries/net/minecraftforge/eventbus/6.0.3/eventbus-6.0.3.jar:libraries/net/minecraftforge/forgespi/6.0.0/forgespi-6.0.0.jar:libraries/net/minecraftforge/coremods/5.0.1/coremods-5.0.1.jar:libraries/cpw/mods/modlauncher/10.0.8/modlauncher-10.0.8.jar:libraries/net/minecraftforge/unsafe/0.2.0/unsafe-0.2.0.jar:libraries/com/electronwill/night-config/core/3.6.4/core-3.6.4.jar:libraries/com/electronwill/night-config/toml/3.6.4/toml-3.6.4.jar:libraries/org/apache/maven/maven-artifact/3.8.5/maven-artifact-3.8.5.jar:libraries/net/jodah/typetools/0.8.3/typetools-0.8.3.jar:libraries/net/minecrell/terminalconsoleappender/1.2.0/terminalconsoleappender-1.2.0.jar:libraries/org/jline/jline-reader/3.12.1/jline-reader-3.12.1.jar:libraries/org/jline/jline-terminal/3.12.1/jline-terminal-3.12.1.jar:libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar:libraries/org/openjdk/nashorn/nashorn-core/15.3/nashorn-core-15.3.jar:libraries/net/minecraftforge/JarJarSelector/0.3.16/JarJarSelector-0.3.16.jar:libraries/net/minecraftforge/JarJarMetadata/0.3.16/JarJarMetadata-0.3.16.jar:libraries/net/minecraftforge/fmlloader/1.19.2-43.3.0/fmlloader-1.19.2-43.3.0.jar:libraries/net/minecraft/server/1.19.2-20220805.130853/server-1.19.2-20220805.130853-extra.jar:libraries/com/github/oshi/oshi-core/5.8.5/oshi-core-5.8.5.jar:libraries/com/google/code/gson/gson/2.8.9/gson-2.8.9.jar:libraries/com/google/guava/failureaccess/1.0.1/failureaccess-1.0.1.jar:libraries/com/google/guava/guava/31.0.1-jre/guava-31.0.1-jre.jar:libraries/com/mojang/authlib/3.11.49/authlib-3.11.49.jar:libraries/com/mojang/brigadier/1.0.18/brigadier-1.0.18.jar:libraries/com/mojang/datafixerupper/5.0.28/datafixerupper-5.0.28.jar:libraries/com/mojang/javabridge/1.2.24/javabridge-1.2.24.jar:libraries/com/mojang/logging/1.0.0/logging-1.0.0.jar:libraries/commons-io/commons-io/2.11.0/commons-io-2.11.0.jar:libraries/io/netty/netty-buffer/4.1.77.Final/netty-buffer-4.1.77.Final.jar:libraries/io/netty/netty-codec/4.1.77.Final/netty-codec-4.1.77.Final.jar:libraries/io/netty/netty-common/4.1.77.Final/netty-common-4.1.77.Final.jar:libraries/io/netty/netty-handler/4.1.77.Final/netty-handler-4.1.77.Final.jar:libraries/io/netty/netty-resolver/4.1.77.Final/netty-resolver-4.1.77.Final.jar:libraries/io/netty/netty-transport/4.1.77.Final/netty-transport-4.1.77.Final.jar:libraries/io/netty/netty-transport-classes-epoll/4.1.77.Final/netty-transport-classes-epoll-4.1.77.Final.jar:libraries/io/netty/netty-transport-native-epoll/4.1.77.Final/netty-transport-native-epoll-4.1.77.Final-linux-x86_64.jar:libraries/io/netty/netty-transport-native-epoll/4.1.77.Final/netty-transport-native-epoll-4.1.77.Final-linux-aarch_64.jar:libraries/io/netty/netty-transport-native-unix-common/4.1.77.Final/netty-transport-native-unix-common-4.1.77.Final.jar:libraries/it/unimi/dsi/fastutil/8.5.6/fastutil-8.5.6.jar:libraries/net/java/dev/jna/jna/5.10.0/jna-5.10.0.jar:libraries/net/java/dev/jna/jna-platform/5.10.0/jna-platform-5.10.0.jar:libraries/net/sf/jopt-simple/jopt-simple/5.0.4/jopt-simple-5.0.4.jar:libraries/org/apache/commons/commons-lang3/3.12.0/commons-lang3-3.12.0.jar:libraries/org/apache/logging/log4j/log4j-api/2.17.0/log4j-api-2.17.0.jar:libraries/org/apache/logging/log4j/log4j-core/2.17.0/log4j-core-2.17.0.jar:libraries/org/apache/logging/log4j/log4j-slf4j18-impl/2.17.0/log4j-slf4j18-impl-2.17.0.jar:libraries/org/slf4j/slf4j-api/1.8.0-beta4/slf4j-api-1.8.0-beta4.jar cpw.mods.bootstraplauncher.BootstrapLauncher --launchTarget forgeserver --fml.forgeVersion 43.3.0 --fml.mcVersion 1.19.2 --fml.forgeGroup net.minecraftforge --fml.mcpVersion 20220805.130853 [00:02:42] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeserver, --fml.forgeVersion, 43.3.0, --fml.mcVersion, 1.19.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220805.130853] [00:02:42] [main/INFO] [cp.mo.mo.Launcher/MODLAUNCHER]: ModLauncher 10.0.8+10.0.8+main.0ef7e830 starting: java version 17.0.10 by Eclipse Adoptium; OS Linux arch amd64 version 6.1.0-12-amd64 [00:02:43] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/home/container/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%2363!/ Service=ModLauncher Env=SERVER [00:02:43] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/fmlcore/1.19.2-43.3.0/fmlcore-1.19.2-43.3.0.jar is missing mods.toml file [00:02:43] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/javafmllanguage/1.19.2-43.3.0/javafmllanguage-1.19.2-43.3.0.jar is missing mods.toml file [00:02:43] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/lowcodelanguage/1.19.2-43.3.0/lowcodelanguage-1.19.2-43.3.0.jar is missing mods.toml file [00:02:43] [main/WARN] [ne.mi.fm.lo.mo.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/mclanguage/1.19.2-43.3.0/mclanguage-1.19.2-43.3.0.jar is missing mods.toml file [00:02:44] [main/WARN] [ne.mi.ja.se.JarSelector/]: Attempted to select two dependency jars from JarJar which have the same identification: Mod File: and Mod File: . Using Mod File: [00:02:44] [main/WARN] [ne.mi.ja.se.JarSelector/]: Attempted to select a dependency jar for JarJar which was passed in as source: resourcefullib. Using Mod File: /home/container/mods/resourcefullib-forge-1.19.2-1.1.24.jar [00:02:44] [main/INFO] [ne.mi.fm.lo.mo.JarInJarDependencyLocator/]: Found 13 dependencies adding them to mods collection Latest log [29Mar2024 00:02:42.803] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher running: args [--launchTarget, forgeserver, --fml.forgeVersion, 43.3.0, --fml.mcVersion, 1.19.2, --fml.forgeGroup, net.minecraftforge, --fml.mcpVersion, 20220805.130853] [29Mar2024 00:02:42.805] [main/INFO] [cpw.mods.modlauncher.Launcher/MODLAUNCHER]: ModLauncher 10.0.8+10.0.8+main.0ef7e830 starting: java version 17.0.10 by Eclipse Adoptium; OS Linux arch amd64 version 6.1.0-12-amd64 [29Mar2024 00:02:43.548] [main/INFO] [mixin/]: SpongePowered MIXIN Subsystem Version=0.8.5 Source=union:/home/container/libraries/org/spongepowered/mixin/0.8.5/mixin-0.8.5.jar%2363!/ Service=ModLauncher Env=SERVER [29Mar2024 00:02:43.876] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/fmlcore/1.19.2-43.3.0/fmlcore-1.19.2-43.3.0.jar is missing mods.toml file [29Mar2024 00:02:43.877] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/javafmllanguage/1.19.2-43.3.0/javafmllanguage-1.19.2-43.3.0.jar is missing mods.toml file [29Mar2024 00:02:43.877] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/lowcodelanguage/1.19.2-43.3.0/lowcodelanguage-1.19.2-43.3.0.jar is missing mods.toml file [29Mar2024 00:02:43.878] [main/WARN] [net.minecraftforge.fml.loading.moddiscovery.ModFileParser/LOADING]: Mod file /home/container/libraries/net/minecraftforge/mclanguage/1.19.2-43.3.0/mclanguage-1.19.2-43.3.0.jar is missing mods.toml file [29Mar2024 00:02:44.033] [main/WARN] [net.minecraftforge.jarjar.selection.JarSelector/]: Attempted to select two dependency jars from JarJar which have the same identification: Mod File: and Mod File: . Using Mod File: [29Mar2024 00:02:44.034] [main/WARN] [net.minecraftforge.jarjar.selection.JarSelector/]: Attempted to select a dependency jar for JarJar which was passed in as source: resourcefullib. Using Mod File: /home/container/mods/resourcefullib-forge-1.19.2-1.1.24.jar [29Mar2024 00:02:44.034] [main/INFO] [net.minecraftforge.fml.loading.moddiscovery.JarInJarDependencyLocator/]: Found 13 dependencies adding them to mods collection
    • I am unable to do that. Brigadier is a mojang library that parses commands.
  • Topics

×
×
  • Create New...

Important Information

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