AtomicStryker's Infernal Mobs

AtomicStryker's Infernal Mobs

34M Downloads

Ruins commandblocks not working on SMP

LemADEC opened this issue · 37 comments

commented

When server uses KCauldron-1.7.10-1614.200 or Thermos-1.7.10-1614.32, ruins command blocks are not triggered.
When server uses plain forge-1.7.10-10.13.4.1614-1.7.10, it works.

Any idea what's going on?

commented

Likely some bukkit permission thing? Does not have required permission to execute command? Check your logs

commented

The same /summon or /testruin commands work in a command block without the triggering prefix, just using a button.
The same commands works when I'm running them as op.
So, it's not a permission issue on the command, it looks more like the trigger isn't happening.

commented

Issue is reproduced with no plugins.
There's no specific logs on sight either.

commented

Any easy way to find out?

commented

No. This would have to be debugged, probably. E.G. you stick debugprints all over the code and see what does and doesnt trigger. Disclaimer: I am not going to do this.

commented

The KCauldron is maybe missing the Forge Event for EntityEvent.EnteringChunk, which Ruins uses to trigger the command blocks.

commented

Checked, this event is not missing.

commented

The problem is actually to do with the loadedTileEntityList, it seems.

commented

@LemADEC does this show up when you enter the area?
Ruins executed and killed Command Block at [pos]

commented

@AtomicStryker There's no way Thermos would modify this EnteringChunk behavior, that would be a horrible idea. It might be that event subscription for it is just not working.

commented

KCauldron changes the nature of loadedTileEntityList to a custom collection (List based). Depending on how you access it, it'll generate exceptions (for loop on the collection) or serious lag (access by index). Not sure if Thermos has same behavior on that one.

I've seen no logs in console when entering the command block proximity. Is there a flag to enable it maybe?

commented

I'm thinking that's why, not because the event is never called. The event is clearly called in the Thermos code.

commented

Relevant code in Ruins: https://github.com/AtomicStryker/atomicstrykers-minecraft-mods/blob/1.8/Ruins/src/main/java/atomicstryker/ruins/common/RuinsMod.java#L119

I dont remember but i think this is a weak clone (same objects) of the loaded tile entity list

commented

If KCauldron didn't use that, it would likely break more than just Ruins.

commented

@AtomicStryker you are right, they call it the "addedTileEntityList". This is a stupid idea and should've never been implemented if it creates incompatibility like this. Will be figuring out how to remove it...

commented

@LemADEC try disabling prevent-invalid-ticks... in cauldron.yml and restarting

commented

I can't find "prevent-invalid-ticks" in any *.yml of my server, currently running with Thermos-1.7.10-1614.32-server.jar

commented

@LemADEC Woops I meant prevent-invalid-tileentity-updates: false in tileentities.yml sorry!

commented

Option was true, it's now false. I've updated to Thermos-1.7.10-1614.35-bleeding-server.jar.
Issue is still reproduced, no logs in sight.

commented

@LemADEC are you certain you don't just have command blocks disabled in-game in your Thermos setup and not in Forge?

commented

Also, do the command blocks just sit there and never activate?

commented

The command blocks do seat there and never activate.

As of Thermos-1.7.10-1614.35-bleeding-server.jar, if I remove the "RUINSTRIGGER " prefix and trigger with a button, the command do execute.
Both following commands were tested succesfully;
"/summon Sheep ~0 ~0 ~0 {PersistenceRequired:1}"
"/testruin savanna/ShepherdShack_1v7v10 ~0 ~10 ~0"

I've copied the related template hereafter for reference:

# Shepherd Shack
# MC 1.7.10; 15 Dec 2014
# Created by Ruins mod version 14.4 Ingame Parser
# authoring Player: Jordan_Greywolf
# Last Updated 29 Oct 2015

biomesToSpawnIn=savanna,savanna m,savanna plateau,savanna plateau m

uniqueMinDistance=2000

weight=1
embed_into_distance=1
acceptable_target_blocks=

unacceptable_target_blocks=flowing_water,water,flowing_lava,lava,cloud,Natura:Cloud

dimensions=8,9,9
allowable_overhang=0
max_leveling=2
leveling_buffer=-1
preserve_water=0
preserve_lava=0
preserve_plants=1

rule1=0,100,minecraft:grass-0
rule2=0,100,minecraft:log2-0
rule3=0,100,minecraft:stained_hardened_clay-0
rule4=0,100,minecraft:stained_hardened_clay-8
rule5=0,100,minecraft:tallgrass-1
rule6=0,100,CommandBlock:RUINSTRIGGER /summon Sheep ~0 ~0 ~0 {PersistenceRequired:1}:@
rule7=0,100,minecraft:crafting_table-0
rule8=0,100,minecraft:carpet-0
rule9=0,100,minecraft:fence_gate-2
rule10=0,100,minecraft:wooden_door-1
rule11=0,100,minecraft:lit_furnace-2
rule12=0,100,CommandBlock:RUINSTRIGGER /summon Villager ~0 ~0 ~0 {Profession:0,CustomName:Shepherd,Offers:{Recipes:[{uses:-50,maxUses:50,buy:{id:296,Count:22},sell:{id:388,Count:1}},{maxUses:1,buy:{id:359,Count:1},sell:{id:388,Count:1}},{uses:-50,maxUses:100,buy:{id:35,Count:4},sell:{id:287,Count:12}},{uses:-50,maxUses:100,buy:{id:388,Count:1},sell:{id:35,Count:8}},{uses:-50,maxUses:100,buy:{id:355,Count:1},sell:{id:35,Count:3}},{uses:-50,maxUses:100,buy:{id:351,Count:32},sell:{id:388,Count:1}},{uses:-10,maxUses:10,buy:{id:388,Count:12},sell:{id:359,Count:1,tag:{display:{Name:"Shears of Silk"},ench:[{id:33,lvl:1}]}}},{uses:-10,maxUses:10,buy:{id:388,Count:40},sell:{id:359,Count:1,tag:{display:{Name:"Shears of Fortune"},ench:[{id:33,lvl:1},{id:34,lvl:5},{id:35,lvl:5}]}}}]}}:@
rule13=0,100,minecraft:fence-0
rule14=2,100,minecraft:torch-4
rule15=2,100,minecraft:torch-3
rule16=0,100,minecraft:wooden_door-8
rule17=0,100,minecraft:cobblestone_wall-0
rule18=0,100,minecraft:wool-0
rule19=0,100,minecraft:log2-8
rule20=0,100,minecraft:log2-4
rule21=1,100,minecraft:torch-5

#----------------------------

layer
1,1,1,1,1,1,1,1,1
1,2,3,3,3,3,3,2,1
1,3,4,4,4,4,4,3,1
1,3,4,4,4,4,4,3,1
1,3,4,4,4,4,4,4,4
1,3,4,4,4,4,4,3,1
1,3,4,4,4,4,4,3,1
1,2,3,3,3,3,3,2,1
1,1,1,1,1,1,1,1,1
endlayer

layer
5,5,5,5,5,5,5,5,5
5,2,3,3,3,3,3,2,5
5,3,8,6,7,0,6,3,5
5,3,8,0,9,0,0,3,5
5,3,12,0,11,0,0,10,8
5,3,8,0,13,0,0,3,5
5,3,8,6,13,0,6,3,5
5,2,3,3,3,3,3,2,5
5,5,5,5,5,5,5,5,5
endlayer

layer
0,0,0,0,0,0,0,0,0
15,2,3,3,13,3,3,2,14
0,3,0,0,0,0,0,3,0
0,3,0,0,0,0,0,3,0
0,13,0,0,17,0,0,16,0
0,3,0,0,8,0,0,3,0
0,3,0,0,8,0,0,3,0
15,2,3,3,13,3,3,2,14
0,0,0,0,0,0,0,0,0
endlayer

layer
0,0,0,0,0,0,0,0,0
0,2,3,3,3,3,3,2,0
0,3,0,0,17,0,0,3,0
0,3,0,0,17,0,0,3,0
0,3,17,17,17,17,17,3,0
0,3,0,0,17,0,0,3,0
0,3,0,0,17,0,0,3,0
0,2,3,3,3,3,3,2,0
0,0,0,0,0,0,0,0,0
endlayer

layer
0,18,18,18,18,18,18,18,0
18,18,19,19,19,19,19,18,18
18,20,0,0,0,0,0,20,18
18,20,0,0,21,0,0,20,18
18,20,0,21,17,21,0,20,18
18,20,0,0,21,0,0,20,18
18,20,0,0,0,0,0,20,18
18,18,19,19,19,19,19,18,18
0,18,18,18,18,18,18,18,0
endlayer

layer
0,0,0,0,0,0,0,0,0
0,0,18,18,18,18,18,0,0
0,18,18,0,0,0,18,18,0
0,18,0,0,0,0,0,18,0
0,18,0,0,17,0,0,18,0
0,18,0,0,0,0,0,18,0
0,18,18,0,0,0,18,18,0
0,0,18,18,18,18,18,0,0
0,0,0,0,0,0,0,0,0
endlayer

layer
0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0
0,0,18,18,18,18,18,0,0
0,0,18,18,18,18,18,0,0
0,0,18,18,18,18,18,0,0
0,0,18,18,18,18,18,0,0
0,0,18,18,18,18,18,0,0
0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0
endlayer

layer
0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0
0,0,0,0,17,0,0,0,0
0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0
0,0,0,0,0,0,0,0,0
endlayer

commented

This was fixed in Thermos.
CyberdyneCC/Thermos#180

commented

Weird. I'm using Thermos Build 58 and can still reproduce this issue.

Do I need to change any of the default settings (prevent-invalid-tileentity-updates, tick-no-players for CommandBlock)?

commented

I am not sure ((((
@LemADEC il a été resolu, non?

commented

Yep, after setting prevent-invalid-tileentity-updates to false and tick-no-players to true the problem was resolved (tick-no-players is probably not required).

commented

Did someone manage to solve (or workaround) this problem after all?

I'm currently trying to use Ruins on my Thermos server, and I feel that without functioning Command Blocks lots of structures are too easy to loot.

commented

As far as I remember, you need Thermos and some additional fixes in the mod itself as it's doing bad multithreading.

commented

I did some check and the event is properly fired.
Players are recognized but the tile entity list doesn't include the command blocks.
I did a dump and it seems TileEntityCommandBlock is just not there.
@robotia how are implemented Command Blocks in Cauldron/Thermos?

commented

Whatever this is, it still has nothing to do with Ruins

commented

@LemADEC they should not be any different from Forge default. I will try to see what's wrong though 😕

commented

They don't show up in the tileentity list.
I remember bukkit changes command blocks for some reason, so that might be another reason.

commented

I did some more testing and the tile entities are effectively present on server side when you getTileEntity(), they do have the proper class, they're just missing in the world tile entity list.

commented

Hmm...It might be that the command blocks are stored in the added tile entity list or that they aren't stored because they normally don't tick

commented

How can we access that 'added tile entity list'?

commented

This is slightly off topic but tellraw @A is broke AF on thermos also, let's just say... It doesnt stop

Details: it just keeps ticking the command block like its being powered again and again every tick....

commented

interresting but completely unrelated to the way the mod uses command block