#Custom TNT (Template)

1 messages · Page 1 of 1 (latest)

wraith quiver
#

Also I Forgot To Mention This, But The TNT Also Becomes Brighter When Ignited, Forgot To Mention That Sry...

patent mesa
#

Questions

#

What's the point of the ticking component. It's using query.is_onfire which is a entity component.

#

Also you missed fire charge to light tnt

#

Also why is it immune to explosions. Vanilla tnt isn't

#

Why does it need loot table when it would of dropped the block anyway

#

Why is it summoning the tnt -1 y. That will go below where the block was.

patent mesa
#

Did I ask too many questions. You've been typing a while.

wraith quiver
# patent mesa Questions

Lots Of Questions (Good To Have)
I'll Address Each One Of Them With There Own Personal Responses
1.) The Ticking Part Was Some Attempt Of Trying To Get The Blocks Every Second Of It, While Testing If The Block Was On Fire To Activate, But It Didn't Work. I Left It In The Note That Burning Wasn't Working Yet, But Left It Intentionally To See If Someone Else Can Figure Something Out From There. The Query, Was Probably A Quick Test To See If It Work, But Didn't.

2.) I See, My Bad. Will Implement. I Was To Focus On Making The Flint And Steel Work. But It's Not A Hard Fix To Add.

3.) I Didn't Want Them To Exactly Take Damage (Like Dying) From Themselves. And It Didn't Appear That Normal TNT Took Damage

4.) Oh, Yeah. The Block Doesn't Need A Loot Table For This Instance. That's Kind Of Weird. I Thought I Would Require Some Type Of Table To At Least Drop Itself, But I Guess Not.

5.) I Have It Spawning At A Lower Coordinate So It's Less Likely To "Hop Out" If It's In A Hole

patent mesa
#

Is the hopping because of the script?

#

Also tnt indeed doesn't take damage but just starts to explode Instead. This can probably be done through script.

#

Also for the exploding when catching on fire thing you could use execute commands to test for fire that is in specific block states (in theory)

wraith quiver
# patent mesa Is the hopping because of the script?

Probably, The Script Doesn't Necessary Look The Friendliest To Fix, But I Could Just Edit "y" To A Set Value.
As For The TNT Exploding Next To Each Other. How Would That Be Done. Just Quickly Looking Would Thisworld.afterEvents.explosion.subscribe Be It. As For The Execute You Just Mention I Could Go By Scripts Or Functions.

patent mesa
#

Yah scripts always better

wraith quiver
# patent mesa Yah scripts always better

Thanks For Feedback, It's Always Nice To Have Someone Else Look At Something Seeing Issues Or Problems I May Have Not Found. And That's Where I'm Going To Focus On And Work On.

patent mesa
#

np. I actually just made a custom tnt block for someone else lol.

#

a commision

wraith quiver
lavish cobalt
#

Does it work the same coming out of a dispenser

wraith quiver
lavish cobalt
#

That was the most important part I had to solve when I made mine (non-script).

wraith quiver
lavish cobalt
#

It needs to explode upon impact

#

Another Issue I had to make sure of, is that it came from a dispenser... and not someone dropping the item.

lavish cobalt
#

Tick timing was the biggest issue I had to deal with, the right delays

#

also make sure it follows the gamerule for TNT

raven temple
#

@wraith quiver Will you make a updated version of the template with the fixes, of the here mentioned stuff?

wraith quiver
raven temple
wraith quiver
wraith quiver
# raven temple Okay, also I'm not a script expert, but is it possible to also detect if a playe...

@raven temple This Is What The Fired Arrow On Custom TNT Would Look Like ```js
// TNT Fire Dection By Projectile Instance
world.afterEvents.projectileHit.subscribe((data) => {
const Projectile = data.projectile
const HitBlock = data.getBlockHit()
const Player = data.source
const onfire = Projectile.getComponent("minecraft:onfire")

if (Projectile.typeId === "minecraft:arrow" && onfire) {
    if (TNTEntityList.includes(HitBlock.block.typeId)) {
        const XYZ = {
            x: HitBlock.block.location.x,
            y: HitBlock.block.location.y,
            z: HitBlock.block.location.z

        }
        console.warn(XYZ.x, XYZ.y, XYZ.z)
        Player.runCommandAsync(`setblock ${XYZ.x} ${XYZ.y} ${XYZ.z} air`)
        Player.runCommandAsync(`summon bridge:custom_tnt ${XYZ.x} ${XYZ.y} ${XYZ.z}`)
    }
}

})```

wraith quiver
#

Now Looking At It. I Hope In Later Updates They Don't Break My Script As Much As I Feel Like They Could Do

south harbor
#

🤷🏻‍♂️ i doubt its gonna be a big break if it does happen.

wraith quiver
#

At Line 454 Of My Script, Just Finishing Redstone Logic

wraith quiver
#

Man I'm Kinda Stoke On How Far I Was Able To Use Redstone In Script, And The Progressed Made So Far

woven grail
wraith quiver
#

Also Its Probably A Great Time To Post The Updated Template

wraith quiver
#

Yea The Addon Itself Needs Redone. Also could implement possible piston mechanics since they fix it.

wraith quiver
#

Its Just A Way Better Version Of The Previous Code. Uses Custom Components. Its Not Fully Converted But This Is A Start

#

I Mean I Made The Previous Code When Minecraft/Server Was Like At 1.7.0-beta

wraith quiver
#

I'm Just Finishing The Redstone Functionality With Levers, Plates, Etc

#

Hopefully Pistions Work Properly