Compare commits
No commits in common. "master" and "1.0.1+1.16.2" have entirely different histories.
master
...
1.0.1+1.16
@ -1,14 +1,5 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
**1.0.4**
|
|
||||||
* Fix Crash When Sneak-Using Dye On A Block
|
|
||||||
|
|
||||||
**1.0.3**
|
|
||||||
* Fix Gravity Crash
|
|
||||||
|
|
||||||
**1.0.2**
|
|
||||||
* Attempt To Fix Structure Generation Crash
|
|
||||||
|
|
||||||
**1.0.1**
|
**1.0.1**
|
||||||
* Add Advancements
|
* Add Advancements
|
||||||
* Industrial Laser Can Smelt Nether Gold Ore
|
* Industrial Laser Can Smelt Nether Gold Ore
|
||||||
|
@ -10,7 +10,7 @@ org.gradle.jvmargs = -Xmx1G
|
|||||||
fabric_loader_version = 0.9.2+build.206
|
fabric_loader_version = 0.9.2+build.206
|
||||||
|
|
||||||
# Mod Properties
|
# Mod Properties
|
||||||
mod_version = 1.0.4
|
mod_version = 1.0.1
|
||||||
maven_group = com.thebrokenrail
|
maven_group = com.thebrokenrail
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
|
@ -106,7 +106,6 @@ public class PhaseShifterBlock extends EnergyBlock {
|
|||||||
UseBlockCallback.EVENT.register((player, world, hand, hit) -> {
|
UseBlockCallback.EVENT.register((player, world, hand, hit) -> {
|
||||||
if (!player.isSpectator() && player.shouldCancelInteraction()) {
|
if (!player.isSpectator() && player.shouldCancelInteraction()) {
|
||||||
BlockState state = world.getBlockState(hit.getBlockPos());
|
BlockState state = world.getBlockState(hit.getBlockPos());
|
||||||
if (state.getBlock() == PhaseShifterBlock.this) {
|
|
||||||
ItemStack stack = player.getStackInHand(hand);
|
ItemStack stack = player.getStackInHand(hand);
|
||||||
if (stack.getItem() instanceof DyeItem) {
|
if (stack.getItem() instanceof DyeItem) {
|
||||||
DyeColor newColor = ((DyeItem) stack.getItem()).getColor();
|
DyeColor newColor = ((DyeItem) stack.getItem()).getColor();
|
||||||
@ -119,7 +118,6 @@ public class PhaseShifterBlock extends EnergyBlock {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return ActionResult.PASS;
|
return ActionResult.PASS;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -19,23 +19,17 @@ class StructureGeneratorPiece extends StructurePiece {
|
|||||||
private final StructureGeneratorBlock block;
|
private final StructureGeneratorBlock block;
|
||||||
private final BlockRotation rotation;
|
private final BlockRotation rotation;
|
||||||
private final BlockPos pos;
|
private final BlockPos pos;
|
||||||
private boolean placed;
|
|
||||||
|
|
||||||
private StructureGeneratorPiece(StructureGeneratorBlock block, BlockRotation rotation, BlockPos pos, boolean placed) {
|
StructureGeneratorPiece(StructureGeneratorBlock block, BlockRotation rotation, BlockPos pos) {
|
||||||
super(block.piece, 0);
|
super(block.piece, 0);
|
||||||
this.block = block;
|
this.block = block;
|
||||||
this.rotation = rotation;
|
this.rotation = rotation;
|
||||||
this.pos = pos;
|
this.pos = pos;
|
||||||
this.placed = placed;
|
|
||||||
boundingBox = BlockBox.create(pos.getX(), pos.getY(), pos.getZ(), pos.getX() + 1, pos.getY() + 1, pos.getZ() + 1);
|
boundingBox = BlockBox.create(pos.getX(), pos.getY(), pos.getZ(), pos.getX() + 1, pos.getY() + 1, pos.getZ() + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
StructureGeneratorPiece(StructureGeneratorBlock block, BlockRotation rotation, BlockPos pos) {
|
|
||||||
this(block, rotation, pos, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
StructureGeneratorPiece(StructureGeneratorBlock block, CompoundTag tag) {
|
StructureGeneratorPiece(StructureGeneratorBlock block, CompoundTag tag) {
|
||||||
this(block, BlockRotation.valueOf(tag.getString("Rot")), new BlockPos(tag.getInt("X"), tag.getInt("Y"), tag.getInt("Z")), tag.getBoolean("Placed"));
|
this(block, BlockRotation.valueOf(tag.getString("Rot")), new BlockPos(tag.getInt("X"), tag.getInt("Y"), tag.getInt("Z")));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -44,12 +38,10 @@ class StructureGeneratorPiece extends StructurePiece {
|
|||||||
tag.putInt("X", pos.getX());
|
tag.putInt("X", pos.getX());
|
||||||
tag.putInt("Y", pos.getY());
|
tag.putInt("Y", pos.getY());
|
||||||
tag.putInt("Z", pos.getZ());
|
tag.putInt("Z", pos.getZ());
|
||||||
tag.putBoolean("Placed", placed);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean generate(StructureWorldAccess world, StructureAccessor structureAccessor, ChunkGenerator chunkGenerator, Random random, BlockBox boundingBox, ChunkPos chunkPos, BlockPos blockPos) {
|
public boolean generate(StructureWorldAccess world, StructureAccessor structureAccessor, ChunkGenerator chunkGenerator, Random random, BlockBox boundingBox, ChunkPos chunkPos, BlockPos blockPos) {
|
||||||
if (!placed) {
|
|
||||||
BlockState state = block.getDefaultState().rotate(rotation);
|
BlockState state = block.getDefaultState().rotate(rotation);
|
||||||
|
|
||||||
world.setBlockState(pos, state, 3);
|
world.setBlockState(pos, state, 3);
|
||||||
@ -59,9 +51,6 @@ class StructureGeneratorPiece extends StructurePiece {
|
|||||||
}
|
}
|
||||||
|
|
||||||
block.schedule(world, pos);
|
block.schedule(world, pos);
|
||||||
|
|
||||||
placed = true;
|
|
||||||
}
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,6 @@ import com.thebrokenrail.energonrelics.block.forcefield.util.BeamBlock;
|
|||||||
import com.thebrokenrail.energonrelics.block.portal.PortalCooldownEntity;
|
import com.thebrokenrail.energonrelics.block.portal.PortalCooldownEntity;
|
||||||
import com.thebrokenrail.energonrelics.config.HardcodedConfig;
|
import com.thebrokenrail.energonrelics.config.HardcodedConfig;
|
||||||
import net.minecraft.block.Block;
|
import net.minecraft.block.Block;
|
||||||
import net.minecraft.block.BlockState;
|
|
||||||
import net.minecraft.entity.Entity;
|
import net.minecraft.entity.Entity;
|
||||||
import net.minecraft.nbt.CompoundTag;
|
import net.minecraft.nbt.CompoundTag;
|
||||||
import net.minecraft.server.MinecraftServer;
|
import net.minecraft.server.MinecraftServer;
|
||||||
@ -27,8 +26,6 @@ import java.util.function.Predicate;
|
|||||||
public abstract class MixinEntity implements PortalCooldownEntity {
|
public abstract class MixinEntity implements PortalCooldownEntity {
|
||||||
@Unique
|
@Unique
|
||||||
private int energyPortalCooldown = 0;
|
private int energyPortalCooldown = 0;
|
||||||
@Unique
|
|
||||||
private boolean touchingBeam = false;
|
|
||||||
|
|
||||||
@Shadow
|
@Shadow
|
||||||
public abstract Box getBoundingBox();
|
public abstract Box getBoundingBox();
|
||||||
@ -56,8 +53,7 @@ public abstract class MixinEntity implements PortalCooldownEntity {
|
|||||||
for (int q = k; q < l; ++q) {
|
for (int q = k; q < l; ++q) {
|
||||||
for (int r = m; r < n; ++r) {
|
for (int r = m; r < n; ++r) {
|
||||||
pos.set(p, q, r);
|
pos.set(p, q, r);
|
||||||
BlockState state = getEntityWorld().getBlockState(pos);
|
if (test.test(getEntityWorld().getBlockState(pos).getBlock())) {
|
||||||
if (state.getCollisionShape(getEntityWorld(), pos).isEmpty() && test.test(state.getBlock())) {
|
|
||||||
getEntityWorld().getProfiler().pop();
|
getEntityWorld().getProfiler().pop();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -75,7 +71,7 @@ public abstract class MixinEntity implements PortalCooldownEntity {
|
|||||||
|
|
||||||
@Inject(at = @At("HEAD"), method = "hasNoGravity", cancellable = true)
|
@Inject(at = @At("HEAD"), method = "hasNoGravity", cancellable = true)
|
||||||
public void hasNoGravity(CallbackInfoReturnable<Boolean> info) {
|
public void hasNoGravity(CallbackInfoReturnable<Boolean> info) {
|
||||||
if (!saving && touchingBeam) {
|
if (!saving && isTouching(block -> block instanceof BeamBlock)) {
|
||||||
info.setReturnValue(true);
|
info.setReturnValue(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -96,13 +92,8 @@ public abstract class MixinEntity implements PortalCooldownEntity {
|
|||||||
energyPortalCooldown = tag.getInt(EnergonRelics.NAMESPACE + ":EnergyPortalCooldown");
|
energyPortalCooldown = tag.getInt(EnergonRelics.NAMESPACE + ":EnergyPortalCooldown");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Inject(at = @At("HEAD"), method = "tick")
|
|
||||||
public void tickHead(CallbackInfo info) {
|
|
||||||
touchingBeam = isTouching(block -> block instanceof BeamBlock);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Inject(at = @At("RETURN"), method = "tick")
|
@Inject(at = @At("RETURN"), method = "tick")
|
||||||
public void tickReturn(CallbackInfo info) {
|
public void tick(CallbackInfo info) {
|
||||||
energyPortalCooldown--;
|
energyPortalCooldown--;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
{
|
|
||||||
"replace": false,
|
|
||||||
"values": [
|
|
||||||
"energonrelics:veridium_block"
|
|
||||||
]
|
|
||||||
}
|
|
Reference in New Issue
Block a user