Skip to content

Commit

Permalink
Readd some of the publicly used methods in AbstractBlockSettingsAcces…
Browse files Browse the repository at this point in the history
…sor (#10)
  • Loading branch information
triphora authored May 12, 2022
1 parent 274c676 commit d193d79
Showing 1 changed file with 78 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,74 @@
import net.minecraft.block.Block;
import net.minecraft.block.BlockState;
import net.minecraft.block.MapColor;
import net.minecraft.block.Material;
import net.minecraft.sound.BlockSoundGroup;
import net.minecraft.util.Identifier;

@Mixin(AbstractBlock.Settings.class)
public interface AbstractBlockSettingsAccessor {
/* GETTERS */
@Deprecated
@Accessor
Material getMaterial();

@Deprecated
@Accessor
float getHardness();

@Deprecated
@Accessor
float getResistance();

@Deprecated
@Accessor
boolean getCollidable();

@Deprecated
@Accessor
boolean getRandomTicks();

@Deprecated
@Accessor("luminance")
ToIntFunction<BlockState> getLuminance();

@Deprecated
@Accessor
Function<BlockState, MapColor> getMapColorProvider();

@Deprecated
@Accessor
BlockSoundGroup getSoundGroup();

@Deprecated
@Accessor
float getSlipperiness();

@Deprecated
@Accessor
float getVelocityMultiplier();

@Deprecated
@Accessor
boolean getDynamicBounds();

@Deprecated
@Accessor
boolean getOpaque();

@Deprecated
@Accessor
boolean getIsAir();

@Deprecated
@Accessor
boolean isToolRequired();

/* SETTERS */
@Deprecated
@Accessor
void setMaterial(Material material);

@Accessor
void setHardness(float hardness);

Expand All @@ -42,15 +104,31 @@ public interface AbstractBlockSettingsAccessor {
@Accessor
void setCollidable(boolean collidable);

@Deprecated
@Accessor
void setRandomTicks(boolean ticksRandomly);

@Accessor
void setMapColorProvider(Function<BlockState, MapColor> mapColorProvider);

@Accessor
void setDynamicBounds(boolean dynamicBounds);

@Deprecated
@Accessor
void setOpaque(boolean opaque);

@Deprecated
@Accessor
void setIsAir(boolean isAir);

@Accessor
void setLootTableId(Identifier lootTableId);

@Deprecated
@Accessor
void setToolRequired(boolean toolRequired);

// Cannot be an invoker due to conflicts in mixin: method_9631(Ljava/util/function/ToIntFunction;)Lnet/minecraft/class_4970$class_2251; for target net.minecraft.block.AbstractBlock$Settings conflicts with existing mapping field_10663:Ljava/util/function/ToIntFunction;
@Accessor("luminance")
void setLuminanceFunction(ToIntFunction<BlockState> luminanceFunction);
Expand Down

0 comments on commit d193d79

Please sign in to comment.