Ask help for making MultiBlock machine

One more small question:
How to add chemical formula for my materials?
In gt6 source, I can’t find codes to add that.
likes magics imported into code and those letters suddenly appeared…

2 Likes

You mean the Materials themselves? That would be “mTooltipChemical” in the OreDictMaterial.java which is easily editable. :wink:

Here a Code Example of me editing it for certain Elements:

	// Polyatomic Elements get a Subscript 4 or 8 appended to their ToolTip after PostInit. That way the ToolTip Calculation works properly until PostInit happens.
	MT.P .mTooltipChemical += NUM_SUB[4];
	MT.S .mTooltipChemical += NUM_SUB[8];
	MT.Se.mTooltipChemical += NUM_SUB[8];
2 Likes

hmm that seems only add a subscript number to it…
like “null4”

what I want to do is that some ingots,dusts etc. crafted by my material could display a line like “Na2SO4” in their tooltip.

EDIT:I haven’t noticed “mTooltipChemical” is just a normal String. my issue solved now and thanks a lot for your help :slight_smile:

2 Likes

Yep just a String, and the Subscript Number was an example to help you find the Unicode Characters that you might need for this. :wink:

2 Likes

(Not problem)
MineTweaker3 has such a weird code repo…I meet so many problems when trying to build it
and now I’m stuck in reobf problems, it seems “asm-common” is calling “asm-debug-all-5.0.3” which limited API version to ASM4 or 5 with latest API version and it finally come up with a IllegalArgumentException…
code is like this:
asm-common:

public ClassRemapper(final ClassVisitor classVisitor, final Remapper remapper) {
    this(/* latest api = */ Opcodes.ASM9, classVisitor, remapper);
  }

  protected ClassRemapper(final int api, final ClassVisitor classVisitor, final Remapper remapper) {
    super(api, classVisitor);
    this.remapper = remapper;
  }

and asm-debug-all-5.0.3

    public ClassVisitor(final int api, final ClassVisitor cv) {
        if (api != Opcodes.ASM4 && api != Opcodes.ASM5) {
            throw new IllegalArgumentException();
        }
        this.api = api;
        this.cv = cv;
    }

okay I know everyone’s workspace have different settings so that asking help for that seems impossible…I just wonder that why other mods that still using asm-debug-all-5.0.3.jar is able to build and reobf without any problem…

2 Likes

Finally done building by copying every subProject into one project and copy only source code into an exist project…strange as it, at least it can build…

2 Likes

Hi,I’m now struggled in rendering dynamic texture…
i want to show a layer when some slot have item,but it seems the texture only update when player rejoin the world…
Is there any problems with my code?
EDIT: I studied the Mix Bowl to write these code.

2 Likes

Hrrm, all of this looks correct, so what exactly is the Issue? I have trouble with the text description of the Issue, sorry ^^

2 Likes

hmm,the block I’m working is a compute cluster which allows multiple computer works together, and every computer that in cluster can be called as “compute node”
I made this to separate MultiBlock Machine controlling to an individual block, instead of adding a computer to controller block’s crafting recipe(the method in GT6U).
And I want the cluster block can display whether there is a computer in its slots.
And the problem is that the texture only updates when player rejoin the world…there is a video to show that

( and I don’t know why just the first slot rendered…

2 Likes

Simple Solution is call “updateClientData()” on the Serverside after every change. It may not be the proper one, but for this purpose it should be fine.

2 Likes

It works! thanks a lot for helps!
And I don’t care what is should be,If it works,it’s fine at all :slight_smile:

2 Likes

A bit more question , what’s the meaning of the 2nd parameter in UT.Code.toByteS(short,int)?
I wrongly filled the second parameter that confused me to debug a long time.

2 Likes

Index, if you want the first byte 0 or the second byte 1

2 Likes

Sorry for bother again, this method:
ST.moveAll( aFrom, aTo, aFilter, aIgnoreSideFrom, aIgnoreSideTo, aInvertFilter, aEjectItems, aMaxSize, aMinSize, aMaxMove, aMinMove)
Is the third parameter aFilter detect StackSize?

for example,

ItemStackSet<ItemStackContainer> filter = new ItemStackSet<>(); filter.add(ItemStackContainer(0,16,0));//add 16xStone to filter ST.moveAll(deleA, deleB, filter,F, F, F, T, 64, 1, 64, 1);
If deleA have 32xStone,could it be done?
If deleA only have 8xStone,could it be done?

2 Likes

The Filter does NOT detect Stacksize

However if you want to move one specific Stacksize, set the minimum size to 32 and the maximum size to 32, that way anything that isn’t at least 32 wont be moved. That is why the 64 1 64 1 are at the end usually, since that means ALL stacksizes. :wink:

2 Likes

A question:Why we needn’t to unset target that set in checkAndSetTarget after checkStructure2() failed?

2 Likes

Why would you need to unset it in the first place?

2 Likes

I saw checkAndSetTarget contains
if (tTarget != aController && tTarget != null) return false;
if not,when someone changed idea and place a Controller Block another place, He must break all blocks he just placed…
Oh I know why It needn’t ,thanks! :smile_cat:

2 Likes

Yeah the Part Blocks always just check of the Target they have is valid, so they dont really need to be told that the Target invalidated.

2 Likes

Is it possible to set some Machine Block to Transparent?

If I return null in getTexture2(...) ,or set a totally empty texture, It seems transparent but block around it won’t have any brightness…
image
the texture I set:
image

3 Likes