Energy Capacity Procedure Block Not Working

Status
Fixed
Type
Product/platform
MCreator/macOS
Priority
Normal
Fixed in
Issue description

The procedure block "Get Energy Capacity of block x: X y:Y z:Z" I have found does not seem to work as intended.

(Just the procedure block, I found that energy was being capped at its defined capacity)

I have an item which gets the current energy of an block and the capacity and makes it into a text saying "Energy:#/#" using the "format number" text block and the "create text with" text block.

From my testing I found that whenever it outputs text it says "Energy: 200/200" or "Energy: 820/820", the first number (current energy) is correct. But the second number (block energy capacity, the number after the "/") is incorrect as that is not the energy capacity of the block but instead is the current energy.

 

Since I thought some people might ask about wether I used the correct procedure blocks or set up my block correctly, I have used procedure blocks "Get Energy of block x: X y:Y z:Z" and "Get Energy Capacity of block x: X y:Y z:Z"

And for the block I have ticked the box saying enable energy storage, set initial energy to 0 and Maximal energy capacity to 1000, Max energy receive to 80 and Max energy Extract to 140, I left fluid setting at default. In tile entity settings I checked the box making it a tile entity.

The block I made was simply a battery block so it has no other functionality.

(In the code screenshot I attached, the reason why there is a send energy procedure block was so I could test wether it was working because it was outputting 0/0 so I wanted to see wether both were not working or it was just the capacity.)

Attachment Size
Battery block with item334.89 KB 334.89 KB
Code52.02 KB 52.02 KB
Block energy/fluid properties37.86 KB 37.86 KB

Issue comments



Donate to MCreator

By donating to developers you can speed up development, as with more resources, we can dedicate more time to MCreator. It is a free project made by developers working on it in their free time.