Jump to content

[1.12.2] (Finally solved!) Custom block model inventory problem


Sataniq

Recommended Posts

Hello. So, I've started to dabble in the wonderful world of .OBJ. As someone who uses 3D modelling software, and has experience with .OBJ, this is how I'd rather create my models.

I have created a block, that uses a .OBJ model. The block renders in the world just fine, but it does not render in the inventory. I've looked at Forge's example and made sure everything's done the same way, to no avail.

(Image SHOULD be attached)

 

I am getting only 2 errors in the log:

Quote

[19:46:24] [main/ERROR]: OBJModel.Parser: (Model: 'dlim:models/block/ceilingvent.obj', Line: 1) material 'ceilingvent.mtl' referenced but was not found
[19:46:24] [main/ERROR]: OBJModel.Parser: (Model: 'dlim:models/block/ceilingvent.obj', Line: 329) material 'main' referenced but was not found

and that's all. And this shouldn't be happening, because the .mtl file is right next to the .obj file, just as it is in the Forge example here. So I am made of questions.

 

Here is the blockstate JSON:

{
  "forge_marker": 1,
  "defaults": {
    "textures": {},
    "model": "dlim:ceilingvent.obj"
  },
  "variants": {
    "normal": [{}],
    "inventory": [{ "transform": "forge:default-block" }]
  }
}

The .OBJ file:

Spoiler

usemtl ceilingvent.mtl
v 0.1 0.996191 0.9
v 0 0.996191 1
v 0.1 0.996191 0.1
v 0 0.996191 0
v 0.9 0.996191 0.9
v 1 0.996191 1
v 0.9 0.996191 0.1
v 1 0.996191 0
v 0.05 0.896191 0.05
v 0.05 0.896191 0.95
v 0.95 0.896191 0.05
v 0.95 0.896191 0.95
v 0.2 0.996191 0.2
v 0.2 0.996191 0.8
v 0.8 0.996191 0.2
v 0.8 0.996191 0.8
v 0.1 0.896191 0.1
v 0.1 0.896191 0.9
v 0.9 0.896191 0.1
v 0.9 0.896191 0.9
v 0.3 0.996191 0.3
v 0.3 0.996191 0.7
v 0.7 0.996191 0.3
v 0.7 0.996191 0.7
v 0.2 0.896191 0.2
v 0.2 0.896191 0.8
v 0.8 0.896191 0.2
v 0.8 0.896191 0.8
v 0.43561 0.996191 0.43561
v 0.43561 0.996191 0.56439
v 0.56439 0.996191 0.43561
v 0.56439 0.996191 0.56439
v 0.3 0.896191 0.3
v 0.3 0.896191 0.7
v 0.7 0.896191 0.3
v 0.7 0.896191 0.7
v 0.05 0.896191 0.05
v 0.1 0.996191 0.1
v 0.1 0.996191 0.9
v 0.05 0.896191 0.95
v 0.95 0.896191 0.05
v 0.9 0.996191 0.1
v 0.95 0.896191 0.95
v 0.9 0.996191 0.9
v 0.464407 0.94053 0.464407
v 0.43561 0.969328 0.43561
v 0.43561 0.969328 0.56439
v 0.464407 0.94053 0.535593
v 0.4 0.996191 0.4
v 0.4 0.996191 0.6
v 0.4 0.996191 0.4
v 0.4 0.996191 0.6
v 0.535593 0.94053 0.464407
v 0.56439 0.969328 0.43561
v 0.7 0.896191 0.3
v 0.6 0.996191 0.4
v 0.6 0.996191 0.4
v 0.6 0.996191 0.6
v 0.6 0.996191 0.4
v 0.6 0.996191 0.6
v 0.535593 0.94053 0.535593
v 0.56439 0.969328 0.56439
v 0.7 0.896191 0.7
v 0.6 0.996191 0.6
v 0.3 0.896191 0.7
v 0.4 0.996191 0.6
v 0.4 0.996191 0.4
v 0.3 0.896191 0.3
v 0.3 0.896191 0.3
v 0.3 0.896191 0.7
v 0.7 0.896191 0.3
v 0.7 0.896191 0.7
v 0.4 0.996191 0.4
v 0.4 0.996191 0.6
v 0.6 0.996191 0.4
v 0.6 0.996191 0.6
v 0.1 0.896191 0.1
v 0.1 0.896191 0.9
v 0.9 0.896191 0.1
v 0.9 0.896191 0.9
v 0.2 0.996191 0.2
v 0.2 0.996191 0.8
v 0.8 0.996191 0.2
v 0.8 0.996191 0.8
v 0.2 0.896191 0.2
v 0.2 0.896191 0.8
v 0.8 0.896191 0.2
v 0.8 0.896191 0.8
v 0.3 0.996191 0.3
v 0.3 0.996191 0.7
v 0.7 0.996191 0.3
v 0.7 0.996191 0.7
v 0.3 0.896191 0.3
v 0.3 0.896191 0.7
v 0.7 0.896191 0.3
v 0.7 0.896191 0.7
v 0.942697 0.905803 0.951387
v 0.942697 0.990078 0.951387
v 0.690966 0.905803 0.314367
v 0.690966 0.905803 0.690966
v 0.309034 0.905803 0.690966
v 0.395331 0.990078 0.404021
v 0.046945 0.905803 0.055635
v 0.046945 0.990078 0.055635
v 0.682296 0.905803 0.309034
v 0.400664 0.990078 0.604669
v 0.053946 0.905803 0.951387
v 0.053946 0.990078 0.951387
v 0.949698 0.905803 0.055635
v 0.949698 0.990078 0.055635
v 0.604669 0.990078 0.400664
v 0.595999 0.990078 0.395331
v 0.682276 0.905803 0.690966
v 0.314347 0.905803 0.309034
v 0.309034 0.905803 0.317724
v 0.395331 0.990078 0.595999
v 0.604669 0.990078 0.599356
v 0.400644 0.990078 0.395331
v 0.595979 0.990078 0.604669

vt 0 0 0
vt 0.494304 0.973684 0
vt 0.434318 0.552632 0
vt 0.880028 0.315789 0
vt 1 0.315789 0
vt 0 0 0
vt 0.614276 0.973684 0
vt 0.434318 0.973684 0
vt 0.820042 0.842105 0
vt 1 0.842105 0
vt 0 0 0
vt 0.494304 0.552632 0
vt 0.674262 0.552632 0
vt 0.880028 0.842105 0
vt 0.760056 0.315789 0
vt 0 0 0
vt 0.674262 0.973684 0
vt 0.614276 0.552632 0
vt 0.760056 0.842105 0
vt 0.820042 0.315789 0
vt 0 0 0
vt 0.55429 1 0
vt 0.494304 1 0
vt 0.880028 0.815789 0
vt 0.940014 0.815789 0
vt 0 0 0
vt 0.55429 1 0
vt 0.494304 0.526316 0
vt 0.940014 0.342105 0
vt 0 0 0
vt 0.614276 1 0
vt 0.55429 0.526316 0
vt 0.820042 0.815789 0
vt 0.880028 0.342105 0
vt 0 0 0
vt 0.55429 0.526316 0
vt 0.614276 0.526316 0
vt 0.940014 0.815789 0
vt 0.820042 0.342105 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0.73759 0.594095 0
vt 0.957882 0.086521 0
vt 0.73759 0.594095 0
vt 0.887968 0.086521 0
vt 0.73759 0.526316 0
vt 0.73759 0.526316 0
vt 0.957882 0.018742 0
vt 0.73759 0.594095 0
vt 0.73759 0.661874 0
vt 0.887968 0.018742 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0.765762 0.894728 0
vt 0.723703 0.594095 0
vt 0.750128 0.909884 0
vt 0.751478 0.594095 0
vt 0.723703 0.594095 0
vt 0.750128 0.842105 0
vt 0.751478 0.526316 0
vt 0.765762 0.857262 0
vt 0.705766 0.473684 0
vt 0 0 0
vt 0.597187 0.473684 0
vt 0 0 0
vt 0 0 0
vt 0.977215 0.105263 0
vt 0 0 0
vt 0.868635 0.105263 0
vt 0.804408 0.894728 0
vt 0.723703 0.526316 0
vt 0.820042 0.909884 0
vt 0.751478 0.594095 0
vt 0 0 0
vt 0 0 0
vt 0.705766 0.368421 0
vt 0 0 0
vt 0.597187 0.368421 0
vt 0 0 0
vt 0 0 0
vt 0.977215 0 0
vt 0 0 0
vt 0.868635 0 0
vt 0.804408 0.857262 0
vt 0.723703 0.661874 0
vt 0.820042 0.842105 0
vt 0.751478 0.661874 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0 0 0
vt 0.434318 0.947368 0
vt 0 0 0
vt 0 0.947369 0
vt 0.434318 0.526316 0
vt 0 0 0
vt 0 0.526316 0
vt 0 0 0
vt 0 0 0
vt 0.380028 0.894737 0
vt 0 0 0
vt 0.05429 0.894737 0
vt 0.380028 0.578947 0
vt 0 0 0
vt 0.05429 0.578947 0
vt 0 0 0
vt 0.542897 0.315789 0
vt 0 0 0
vt 0.542897 0 0
vt 0 0 0
vt 0.868635 0.315789 0
vt 0 0 0
vt 0.868635 0 0
vt 0 0 0
vt 0.597187 0.263158 0
vt 0 0 0
vt 0.597187 0.052632 0
vt 0 0 0
vt 0.814346 0.263158 0
vt 0 0 0
vt 0.814346 0.052632 0
vt 0 0 0
vt 0 0 0
vt 0.760056 0.526316 0
vt 0 0 0
vt 0.542897 0.526316 0
vt 0 0 0
vt 0.760056 0.315789 0
vt 0 0 0
vt 0.542897 0.31579 0
vt 1 0 0
vt 0 0 0
vt 0.666667 1 0
vt 1 1 0
vt 0 1 0
vt 0.711156 0 0
vt 0.746111 0.28686 0
vt 0.288844 0 0
vt 0.747051 0.713133 0
vt 0.290729 0 0
vt 0.707408 0 0
vt 0.388932 1 0
vt 1 0 0
vt 0.666667 0 0
vt 0 0 0
vt 1 1 0
vt 0 1 0
vt 0.290707 0 0
vt 0 0.290707 0
vt 0.387069 1 0
vt 0 0 0
vt 1 0 0
vt 0 1 0
vt 1 1 0
vt 1 0 0
vt 0 0 0
vt 0.666667 0 0
vt 1 1 0
vt 0 1 0
vt 0.614816 1 0
vt 0.387047 1 0
vt 0.709271 0 0
vt 0 0.709271 0
vt 0.709293 0 0
vt 1 0.290707 0
vt 0.413718 0.289358 0
vt 0.292592 0 0
vt 0.611068 1 0
vt 0.385184 1 0
vt 0.612953 1 0
vt 0.612931 1 0

usemtl main
f 10/29 2/5 4/10 9/25 
f 9/24 4/9 8/20 11/34 
f 11/33 8/19 6/15 12/39 
f 12/38 6/14 2/4 10/29 
f 102/177 104/182 103/180 115/202 
f 99/172 105/184 109/192 
f 3/8 1/3 10/28 9/23 
f 7/18 3/7 9/22 11/32 
f 5/13 7/17 11/31 12/37 
f 1/2 5/12 12/36 10/27 
f 112/196 110/194 109/191 105/183 
f 101/176 107/187 108/189 116/203 
f 43/76 12/35 5/11 44/77 
f 78/129 77/127 81/135 82/137 
f 74/123 73/122 49/87 50/89 
f 41/74 11/30 7/16 42/75 
f 21/48 23/50 91/155 89/151 
f 15/42 16/43 84/141 83/139 
f 27/54 25/52 85/143 87/147 
f 20/47 19/46 79/131 80/133 
f 22/49 21/48 89/151 90/153 
f 60/106 36/69 63/112 64/113 
f 18/45 20/47 80/133 78/128 
f 39/72 1/1 10/26 40/73 
f 28/55 27/54 87/147 88/149 
f 70/119 72/121 96/164 94/160 
f 13/40 15/42 83/139 81/134 
f 25/52 26/53 86/145 85/143 
f 19/46 17/44 77/126 79/131 
f 62/111 54/97 31/63 32/64 
f 59/104 35/68 55/98 56/99 
f 37/70 9/21 3/6 38/71 
f 87/146 88/148 92/156 91/154 
f 33/66 34/67 70/119 69/118 
f 60/106 52/92 74/123 76/125 
f 36/69 35/68 71/120 72/121 
f 52/92 51/90 73/122 74/123 
f 61/108 53/94 54/96 62/110 
f 48/85 61/108 62/110 47/83 
f 46/81 47/84 30/60 29/56 
f 52/93 51/91 29/57 30/59 
f 51/91 59/105 31/62 29/57 
f 59/105 60/107 32/65 31/62 
f 45/78 48/85 47/83 46/80 
f 53/94 45/78 46/80 54/96 
f 61/108 48/85 45/78 53/94 
f 60/107 52/93 30/59 32/65 
f 54/95 46/79 29/56 31/61 
f 47/82 62/109 32/64 30/58 
f 16/43 14/41 82/136 84/141 
f 77/127 79/130 83/138 81/135 
f 73/122 75/124 57/101 49/87 
f 23/50 24/51 92/157 91/155 
f 79/130 80/132 84/140 83/138 
f 26/53 28/55 88/149 86/145 
f 80/132 78/129 82/137 84/140 
f 75/124 76/125 58/103 57/101 
f 86/144 85/142 89/150 90/152 
f 24/51 22/49 90/153 92/157 
f 85/142 87/146 91/154 89/150 
f 88/148 86/144 90/152 92/156 
f 94/161 93/159 49/86 50/88 
f 93/159 95/163 57/100 49/86 
f 95/163 96/165 58/102 57/100 
f 65/114 34/67 52/92 66/115 
f 76/125 74/123 50/89 58/103 
f 96/165 94/161 50/88 58/102 
f 51/90 33/66 68/117 67/116 
f 69/118 70/119 94/160 93/158 
f 72/121 71/120 95/162 96/164 
f 14/41 13/40 81/134 82/136 
f 17/44 18/45 78/128 77/126 
f 71/120 69/118 93/158 95/162 
f 51/90 59/104 75/124 73/122 
f 34/67 36/69 72/121 70/119 
f 35/68 33/66 69/118 71/120 
f 59/104 60/106 76/125 75/124 
f 100/174 97/168 113/198 
f 106/185 108/188 107/186 101/175 
f 115/201 103/179 114/200 
f 99/171 109/190 110/193 111/195 
f 114/199 103/178 104/181 118/205 
f 117/204 98/170 97/167 100/173 
f 113/197 97/166 98/169 119/206

 

The .MTL file:

newmtl main
map_Kd dlim:block_ceiling_vent

 

Does anybody know how to either: Fix the item in the inventory OR for the inventory item, render a texture from the assets, preferrably without creating an item for it?

2018-02-08_19.24.46.png

Edited by Sataniq
Updated title as problem has been fixed
Link to comment
Share on other sites

Hey mate,

I do use Wavefront models also, and do you want to just use a texture as item or the model?

Cuss you can use your model to be rendered as item. you have to register an item for your block or it will not render.

Items are for inventory,Gui, dropped.

 

Always looking for new challenges, and happy to help the people where ever I can

Link to comment
Share on other sites

1) The inventory model is not rendering because you aren't telling it to. Also, I don't know why you are using brackets around normal and inventory.

"variants": {
    "normal": {},
    "inventory": { "model": "dlim:ceilingvent.obj", "transform": "forge:default-block" }
  }

 

2) Your OBJ file doesn't have a line telling it to use your material. You need 

mtllib ceilingvent.mtl

in your OBJ file.

 

3) You named your material 'main' in your mtl file but in your first 'usemtl' in your OBJ file you specify your MTL file instead of the material name.

 

I'm no OBJ master but those are just some discrepancies I have noticed between my OBJ usage and yours.

Link to comment
Share on other sites

I think it should have been mentioned that yes, I have an ItemBlock being registered for the block.

 

Yes, it seems the mtlib had been replaced by usemtl, probably in my confusion while trying to fix the problem. As I said, I am following Forge's example, so as for why I am using brackets, and did the "inventory" part the way I did, see this. After removing the brackets, ALL of the errors have appeared. I'm specifically concerned by the fact that it's now looking in the ITEMS directory

Quote

net.minecraftforge.client.model.ModelLoaderRegistry$LoaderException: Exception loading model dlim:item/block_ceiling_vent with loader VanillaLoader.INSTANCE, skipping

Caused by: java.io.FileNotFoundException: dlim:models/item/block_ceiling_vent.json

It also doesn't seem to want to find the material definition within the .mtl file (and yes, it's spelt correctly).

 

Any ideas? Or could you possibly provide some of your code for how you get .OBJ files to work? (I think that'd be easier than me pestering you all night) :P

 

Edited by Sataniq
Fixed typo
Link to comment
Share on other sites

After putting the brackets back in, I have noticed this:

Quote

OBJLoader.Parser: command 'mtlib' (model: 'dlim:models/block/ceilingvent.obj') is not currently supported, skipping. Line: 1 'mtlib ceilingvent.mtl'

This is odd. Also after making the changes suggested, I am still met with the same results.

Link to comment
Share on other sites

Sure, be warned: I do it in a (slightly) strange way, however it's the way I prefer to do things and simplifies my job quite a lot.

 

In my blocks class, I have the block defined:

@GameRegistry.ObjectHolder(DLIM.MODID + ":block_ceiling_vent")
public static final BlockCeilingVent CEILING_VENT = new BlockCeilingVent("block_ceiling_vent");

 

The block is then put into an array (all blocks will go here):

public static final DBlock[] BLOCKS =
{
    CEILING_VENT
};

 

The blocks are then registered:

public static void RegisterBlocks(final RegistryEvent.Register<Block> event)
{
    final IForgeRegistry<Block> REGISTRY = event.getRegistry();
    REGISTRY.registerAll(BLOCKS);
}

public static void RegisterItemBlocks(final RegistryEvent.Register<Item> event)
{
    for (DBlock block : BLOCKS)
        block.RegisterItemBlock(event);
}

public static void InitializeModels(ModelRegistryEvent event)
{
    for (DBlock block : BLOCKS)
        block.InitializeModel();
}

 

DBlock is a custom class extending Block in which all my blocks will extend, and it looks like this (simplified, other stuff goes here but it's not relevant):

public DBlock(String name, CreativeTabs tab, float hardness, float resistance, Material material, SoundType placeSound, MapColor mapColour)
{
    super(material, mapColour);
    this.setUnlocalizedName(DLIM.MODID + ":" + name);
    this.setRegistryName(new ResourceLocation(DLIM.MODID, name));
    this.setHardness(hardness);
    this.setResistance(resistance);
    this.setSoundType(placeSound);
    this.setCreativeTab(tab);
}

@SuppressWarnings("ConstantConditions")
@Override
public void RegisterItemBlock(final RegistryEvent.Register<Item> event)
{
    System.out.println("Registering ItemBlock for " + getUnlocalizedName());
    event.getRegistry().register(new ItemBlock(this).setRegistryName(this.getRegistryName()));
}

@SuppressWarnings("ConstantConditions")
@Override
@SideOnly(Side.CLIENT)
public void InitializeModel()
{
    ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(this), 0, new ModelResourceLocation(getRegistryName(), "inventory"));
}

 

The register events are called:

@SubscribeEvent
public static void registerItems(final RegistryEvent.Register<Item> event)
{
    DBlocks.RegisterItemBlocks(event);
}

@SubscribeEvent
public static void registerBlocks(final RegistryEvent.Register<Block> event)
{
    DBlocks.RegisterBlocks(event);
}

 

And from the Client proxy:

@Override
public void PreInitialization(FMLPreInitializationEvent event)
{
    OBJLoader.INSTANCE.addDomain(DLIM.MODID);
    super.PreInitialization(event);
}

@SubscribeEvent
public static void RegisterModels(ModelRegistryEvent event)
{
    DBlocks.InitializeModels(event);
}
Link to comment
Share on other sites

Without the brackets in the blockstate JSON file, that's what it was telling me. I changed the file to look like this:

Quote

{
  "forge_marker": 1,
  "defaults": {
    "textures": {},
    "model": "dlim:ceilingvent.obj"
  },
  "variants": {
    "normal": [{
      "model": "dlim:ceilingvent.obj"
    }],
    "inventory": [{
      "model": "dlim:ceilingvent.obj"
    }]
  }
}

No errors, but still the same result - block renders fine, inventory item is a huge purple and black square.

 

EDIT: It seems I can now remove the square brackets after adding the model definition for the "normal" variant, but the overall issue still remains

Edited by Sataniq
Link to comment
Share on other sites

I think the problem could be in your code. I don't do my registration from events, rather I just call ForgeRegistries.BLOCKS.register(...) for blocks and ForgeRegistries.ITEMS.register(...) for items. You can look at my class here if you wish:

https://github.com/WaffleMan0310/AncientMagicks/blob/master/src/main/java/com/waffleman0310/ancientmagicks/init/Blocks.java

  • Like 1
Link to comment
Share on other sites

Thanks, so I changed the code around a little, and now it works! I don't know why Forge's own events weren't loading the model properly, but it looks like I will be using your way of registering things from now on! You sir, are a legend, take 100 cookies :D

 

Here's how I'm now registering the blocks:

public static void RegisterAll()
{
    RegisterBlock(CEILING_VENT, new ItemBlock(CEILING_VENT));
}

@SideOnly(Side.CLIENT)
public static void RegisterRenderers()
{
    ModelLoader.setCustomModelResourceLocation(Item.getItemFromBlock(CEILING_VENT), 0, new ModelResourceLocation(new ResourceLocation(DLIM.MODID, "block_ceiling_vent"), "inventory"));
}

private static void RegisterBlock(Block block, ItemBlock item)
{
    ForgeRegistries.BLOCKS.register(block);
    ForgeRegistries.ITEMS.register(item.setRegistryName(block.getRegistryName()));
}
Link to comment
Share on other sites

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

    • 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.