Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Powderbarrel #1019

Closed
wants to merge 4 commits into from
Closed

Add Powderbarrel #1019

wants to merge 4 commits into from

Conversation

Quarri6343
Copy link
Member

What:
I added Powderbarrel, the early game explosive from GT5
It is suggested in #gtceu-todo channel and #275
It has no assembler recipe to encourage people to use regular TNT (same with GT5)
It also can be used in implosion compressor at 2x the input amount as TNT

Powderbarrel can be placed and behaves like TNT but they are different in many places
・It cannot be lit by redstone (GT5 feature)
・It can be lit by breaking it, so you don't have to bring a lighter to your mine (same with GT5)
You can safely harvest it by sneaking or use silk touch
・It's explosion range is 5x5x5 box (bigger than dynamite)
・Most importantly, it drops all items in explosion

Implementation Details:
too much to explain
Please ask me in discord

Outcome:
close #275

Additional info:

8mb.video-7Xp-pl2RFpEm.mp4

Possible compatibility issue:
if any modpack uses TNT to gate Implosion Compressor, it has to ban this block

@ALongStringOfNumbers ALongStringOfNumbers added the type: feature New feature or request label Aug 10, 2022
Copy link
Contributor

@LAGIdiot LAGIdiot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the idea of having block like this. But implementation at some places feels wrong I commented on them.

Also Powder Barrel does not "catch on fire" even though there was fire all around, which seems strange and I am not sure if it is by design.


import javax.annotation.Nonnull;

public class BlockPowderBarrel extends VariantBlock<BlockPowderBarrel.BlockType> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you need to extend VariantBlock if this has only one variant? Couldn't you just extend Block?


public BlockPowderBarrel() {
super(net.minecraft.block.material.Material.TNT);
setSoundType(SoundType.SAND);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This block feels more like wooden, then sandy so it could use wood sounds.

setFuse(this.getFuse() - 1);
if (this.getFuse() <= 0) {
this.setDead();
if (!this.world.isRemote && !this.inWater) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is check for water really needed? Also what is expected behavior from this? As right now entity will just float away and disappear without exploding, which doesn't seems correct.


}

protected void explode() {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Explosion removes water blocks even water source block which is kind of strange and maybe not intended. Also similarly it will drop TNT bock placed in range instead of priming it.

Copy link
Contributor

@LAGIdiot LAGIdiot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per my previous comments.

@serenibyss
Copy link
Member

Superseded by #2314

@serenibyss serenibyss closed this Dec 20, 2023
@serenibyss serenibyss deleted the powderbarrel branch December 20, 2023 04:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Powderbarrels
4 participants