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

Fix FabricBlockSettings copyOf missing settings #3373

Merged
merged 1 commit into from
Oct 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -69,10 +69,18 @@ protected FabricBlockSettings(AbstractBlock.Settings settings) {
thisAccessor.setDynamicBounds(otherAccessor.getDynamicBounds());
thisAccessor.setOpaque(otherAccessor.getOpaque());
thisAccessor.setIsAir(otherAccessor.getIsAir());
thisAccessor.setBurnable(otherAccessor.getBurnable());
thisAccessor.setLiquid(otherAccessor.getLiquid());
thisAccessor.setForceNotSolid(otherAccessor.getForceNotSolid());
thisAccessor.setForceSolid(otherAccessor.getForceSolid());
this.pistonBehavior(otherAccessor.getPistonBehavior());
thisAccessor.setToolRequired(otherAccessor.isToolRequired());
thisAccessor.setOffsetter(otherAccessor.getOffsetter());
thisAccessor.setBlockBreakParticles(otherAccessor.getBlockBreakParticles());
thisAccessor.setRequiredFeatures(otherAccessor.getRequiredFeatures());
this.emissiveLighting(otherAccessor.getEmissiveLightingPredicate());
this.instrument(otherAccessor.getInstrument());
thisAccessor.setReplaceable(otherAccessor.getReplaceable());

// Not copied in vanilla: field definition order
this.jumpVelocityMultiplier(otherAccessor.getJumpVelocityMultiplier());
Expand All @@ -82,7 +90,6 @@ protected FabricBlockSettings(AbstractBlock.Settings settings) {
this.suffocates(otherAccessor.getSuffocationPredicate());
this.blockVision(otherAccessor.getBlockVisionPredicate());
this.postProcess(otherAccessor.getPostProcessPredicate());
this.emissiveLighting(otherAccessor.getEmissiveLightingPredicate());
}

public static FabricBlockSettings create() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@
import net.minecraft.block.AbstractBlock;
import net.minecraft.block.BlockState;
import net.minecraft.block.MapColor;
import net.minecraft.block.enums.Instrument;
import net.minecraft.block.piston.PistonBehavior;
import net.minecraft.entity.EntityType;
import net.minecraft.resource.featuretoggle.FeatureSet;
import net.minecraft.sound.BlockSoundGroup;
Expand Down Expand Up @@ -106,6 +108,27 @@ public interface AbstractBlockSettingsAccessor {
@Accessor
FeatureSet getRequiredFeatures();

@Accessor
boolean getBurnable();

@Accessor
boolean getLiquid();

@Accessor
boolean getForceNotSolid();

@Accessor
boolean getForceSolid();

@Accessor
PistonBehavior getPistonBehavior();

@Accessor
Instrument getInstrument();

@Accessor
boolean getReplaceable();

/* SETTERS */
@Accessor
void setCollidable(boolean collidable);
Expand Down Expand Up @@ -139,4 +162,19 @@ public interface AbstractBlockSettingsAccessor {

@Accessor
void setOffsetter(Optional<AbstractBlock.Offsetter> offsetter);

@Accessor
void setBurnable(boolean burnable);

@Accessor
void setLiquid(boolean liquid);

@Accessor
void setForceNotSolid(boolean forceNotSolid);

@Accessor
void setForceSolid(boolean forceSolid);

@Accessor
void setReplaceable(boolean replaceable);
}
Loading