fix selective tnt getting wrong block
This commit is contained in:
parent
1a05c6034a
commit
73acc066f2
@ -38,7 +38,7 @@ mod_name=Enhanced Explosives
|
|||||||
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
# The license of the mod. Review your options at https://choosealicense.com/. All Rights Reserved is the default.
|
||||||
mod_license=All Rights Reserved
|
mod_license=All Rights Reserved
|
||||||
# The mod version. See https://semver.org/
|
# The mod version. See https://semver.org/
|
||||||
mod_version=0.9.6
|
mod_version=0.9.7
|
||||||
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
# The group ID for the mod. It is only important when publishing as an artifact to a Maven repository.
|
||||||
# This should match the base package used for the mod sources.
|
# This should match the base package used for the mod sources.
|
||||||
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
# See https://maven.apache.org/guides/mini/guide-naming-conventions.html
|
||||||
|
@ -43,11 +43,11 @@ public class selectivePrimedTNT extends basePrimedTNT {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public String getBlock() {
|
public String getBlock() {
|
||||||
return level().getBlockState(new BlockPos((int) getX(), (int) getY() - 1, (int) getZ())).getBlock().toString();
|
return renderBlock().toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Block renderBlock() {
|
public Block renderBlock() {
|
||||||
return level().getBlockState(new BlockPos((int) getX(), (int) getY() - 1, (int) getZ())).getBlock();
|
return level().getBlockState(new BlockPos((int) Math.floor(getX()), (int) Math.floor(getY()) - 1, (int) Math.floor(getZ()))).getBlock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user