21w19a
This commit is contained in:
1 parent
4542612bc8
commit
727bdd7b1a
8 files changed
+32
-31
No files matched your search
@@ -142,7 +142,7 @@ public class FeatureGenerator
|
||||
findFirst().map(Map.Entry::getValue).orElse(null);
|
||||
}
|
||||
|
||||
public static <T extends FeatureConfig> StructureStart shouldStructureStartAt(ServerWorld world, BlockPos pos, StructureFeature<T> structure, boolean computeBox)
|
||||
synchronized public static <T extends FeatureConfig> StructureStart shouldStructureStartAt(ServerWorld world, BlockPos pos, StructureFeature<T> structure, boolean computeBox)
|
||||
{
|
||||
long seed = world.getSeed();
|
||||
ChunkGenerator generator = world.getChunkManager().getChunkGenerator();
|
||||
|
||||
@@ -1,25 +1,31 @@
|
||||
package carpet.mixins;
|
||||
|
||||
import carpet.CarpetSettings;
|
||||
import net.minecraft.block.Block;
|
||||
import net.minecraft.block.BlockState;
|
||||
import net.minecraft.block.Material;
|
||||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.item.MiningToolItem;
|
||||
import net.minecraft.item.PickaxeItem;
|
||||
import net.minecraft.item.ToolMaterial;
|
||||
import net.minecraft.tag.Tag;
|
||||
import org.spongepowered.asm.mixin.Mixin;
|
||||
import org.spongepowered.asm.mixin.injection.At;
|
||||
import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
//import org.spongepowered.asm.mixin.injection.At;
|
||||
//import org.spongepowered.asm.mixin.injection.Redirect;
|
||||
|
||||
@Mixin(PickaxeItem.class)
|
||||
public class PickaxeItem_missingToolsMixin
|
||||
public class PickaxeItem_missingToolsMixin extends MiningToolItem
|
||||
{
|
||||
@Redirect(method = "getMiningSpeedMultiplier", at = @At(
|
||||
value = "INVOKE",
|
||||
target = "Lnet/minecraft/block/BlockState;getMaterial()Lnet/minecraft/block/Material;"
|
||||
))
|
||||
private Material getCustomMaterial(BlockState blockState)
|
||||
{
|
||||
Material material = blockState.getMaterial();
|
||||
|
||||
protected PickaxeItem_missingToolsMixin(float attackDamage, float attackSpeed, ToolMaterial material, Tag<Block> tag, Settings settings) {
|
||||
super(attackDamage, attackSpeed, material, tag, settings);
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getMiningSpeedMultiplier(ItemStack stack, BlockState state) {
|
||||
Material material = state.getMaterial();
|
||||
if (CarpetSettings.missingTools && material == Material.GLASS)
|
||||
material = Material.STONE;
|
||||
return material;
|
||||
return miningSpeed;
|
||||
return super.getMiningSpeedMultiplier(stack, state);
|
||||
}
|
||||
}
|
||||
@@ -189,7 +189,8 @@ public class FileArgument
|
||||
}
|
||||
catch (IOException e)
|
||||
{
|
||||
throw new ThrowStatement("Unable to open zip file: "+zipContainer, Throwables.IO_EXCEPTION);
|
||||
return null; // undr java 16 no file throws IOException - will take care of it later
|
||||
//throw new ThrowStatement("Unable to open zip file: "+zipContainer, Throwables.IO_EXCEPTION);
|
||||
}
|
||||
}
|
||||
return zfs.getPath(resource+(isFolder?"/":type.extension));
|
||||
|
||||
Reference in new issue
Block a user