Skip to content

Commit

Permalink
A bunch of misc fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
gudenau committed Jan 10, 2020
1 parent 8bdca13 commit cfd515c
Show file tree
Hide file tree
Showing 22 changed files with 464 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G
loader_version=0.7.2+build.175

# Mod Properties
mod_version = 0.0.1
mod_version = 0.0.2
maven_group = net.gudenau.minecraft
archives_base_name = gud_tallworlds

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package net.gudenau.minecraft.tallworlds.mixin.biome;

import net.minecraft.world.biome.Biome;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;

@Mixin(Biome.class)
public abstract class BiomeMixin{
@ModifyConstant(
method = "canSetSnow(Lnet/minecraft/world/WorldView;Lnet/minecraft/util/math/BlockPos;Z)Z",
constant = @Constant(intValue = 256)
)
private static int canSetSnow(int original){
return 512;
}

@ModifyConstant(
method = "canSetIce",
constant = @Constant(intValue = 256)
)
private static int canSetIce(int original){
return 512;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package net.gudenau.minecraft.tallworlds.mixin.block;

import net.minecraft.block.Block;
import net.minecraft.block.ChorusFlowerBlock;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;

@Mixin(ChorusFlowerBlock.class)
public abstract class ChorusFlowerBlockMixin extends Block{
private ChorusFlowerBlockMixin(Settings settings){
super(settings);
}

@ModifyConstant(
method = "scheduledTick",
constant = @Constant(intValue = 256)
)
private static int scheduledTick(int original){
return 512;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package net.gudenau.minecraft.tallworlds.mixin.block;

import net.minecraft.fluid.BaseFluid;
import net.minecraft.fluid.LavaFluid;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;

@Mixin(LavaFluid.class)
public abstract class LavaFluidMixin extends BaseFluid{
@ModifyConstant(
method = "method_15817",
constant = @Constant(intValue = 256)
)
private static int method_15817(int original){
return 512;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package net.gudenau.minecraft.tallworlds.mixin.command;

import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;

@Mixin(targets = "net/minecraft/server/command/SpreadPlayersCommand$Pile")
public abstract class SpreadPlayersCommandMixin{
@ModifyConstant(
method = "getY",
constant = @Constant(doubleValue = 256.0D)
)
private static double getY(double original){
return 512.0D;
}

@ModifyConstant(
method = "getY",
constant = @Constant(intValue = 257)
)
private static int getY(int original){
return 513;
}

@ModifyConstant(
method = "isSafe",
constant = @Constant(doubleValue = 256.0D)
)
private static double isSafe(double original){
return 512.0D;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
package net.gudenau.minecraft.tallworlds.mixin.entity;

import net.fabricmc.api.EnvType;
import net.fabricmc.api.Environment;
import net.minecraft.entity.Entity;
import net.minecraft.server.command.CommandOutput;
import net.minecraft.util.Nameable;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;

@Mixin(Entity.class)
public abstract class EntityMixin implements Nameable, CommandOutput{
@Environment(EnvType.CLIENT)
@ModifyConstant(
method = "afterSpawn",
constant = @Constant(doubleValue = 256D)
)
private static double afterSpawn(double original){
return 512D;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package net.gudenau.minecraft.tallworlds.mixin.entity;

import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityType;
import net.minecraft.entity.FallingBlockEntity;
import net.minecraft.world.World;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;

@Mixin(FallingBlockEntity.class)
public abstract class FallingBlockEntityMixin extends Entity{
private FallingBlockEntityMixin(EntityType<?> type, World world){
super(type, world);
}

@ModifyConstant(
method = "tick",
constant = @Constant(intValue = 256)
)
private static int tick(int original){
return 512;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package net.gudenau.minecraft.tallworlds.mixin.gen;

import net.minecraft.world.gen.carver.Carver;
import net.minecraft.world.gen.carver.CarverConfig;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;

@Mixin(Carver.class)
public abstract class CarverMixin<C extends CarverConfig>{
@ModifyConstant(
method = "<clinit>",
constant = @Constant(intValue = 256)
)
private static int staticInit(int original){
return 512;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package net.gudenau.minecraft.tallworlds.mixin.gen;

import net.minecraft.world.gen.chunk.ChunkGeneratorConfig;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;

@Mixin(ChunkGeneratorConfig.class)
public abstract class ChunkGeneratorConfigMixin{
@ModifyConstant(
method = "getMinY",
constant = @Constant(intValue = 256)
)
public int getMinY(int original){
return 512;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
package net.gudenau.minecraft.tallworlds.mixin.gen;

import net.minecraft.world.gen.chunk.ChunkGenerator;
import net.minecraft.world.gen.chunk.ChunkGeneratorConfig;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;

@Mixin(ChunkGenerator.class)
public abstract class ChunkGeneratorMixin<C extends ChunkGeneratorConfig>{
@ModifyConstant(
method = "getMaxY",
constant = @Constant(intValue = 256)
)
private static int getMaxY(int original){
return 512;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package net.gudenau.minecraft.tallworlds.mixin.gen;

import net.minecraft.world.gen.chunk.ChunkGeneratorConfig;
import net.minecraft.world.gen.chunk.FlatChunkGeneratorConfig;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;

@Mixin(FlatChunkGeneratorConfig.class)
public abstract class FlatChunkGeneratorConfigMixin extends ChunkGeneratorConfig{
@ModifyConstant(
method = "<init>",
constant = @Constant(intValue = 256)
)
private static int init(int original){
return 512;
}

@ModifyConstant(
method = "parseLayerString",
constant = @Constant(intValue = 256)
)
private static int parseLayerString(int original){
return 512;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package net.gudenau.minecraft.tallworlds.mixin.gen;

import com.mojang.datafixers.Dynamic;
import java.util.function.Function;
import net.minecraft.world.gen.feature.DefaultFeatureConfig;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.FossilFeature;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;

@Mixin(FossilFeature.class)
public abstract class FossilFeatureMixin extends Feature<DefaultFeatureConfig>{
private FossilFeatureMixin(Function<Dynamic<?>, ? extends DefaultFeatureConfig> configDeserializer){
super(configDeserializer);
}

@ModifyConstant(
method = "generate",
constant = @Constant(intValue = 256),
expect = 2
)
private static int generate(int original){
return 512;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package net.gudenau.minecraft.tallworlds.mixin.gen;

import com.mojang.datafixers.Dynamic;
import java.util.function.Function;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.HugeMushroomFeature;
import net.minecraft.world.gen.feature.HugeMushroomFeatureConfig;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;

@Mixin(HugeMushroomFeature.class)
public abstract class HugeMushroomFeatureMixin extends Feature<HugeMushroomFeatureConfig>{
private HugeMushroomFeatureMixin(Function<Dynamic<?>, ? extends HugeMushroomFeatureConfig> configDeserializer){
super(configDeserializer);
}

@ModifyConstant(
method = "method_23374",
constant = @Constant(intValue = 256)
)
private static int method_23374(int original){
return 512;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package net.gudenau.minecraft.tallworlds.mixin.gen;

import net.minecraft.world.IWorld;
import net.minecraft.world.biome.source.BiomeSource;
import net.minecraft.world.gen.chunk.OverworldChunkGenerator;
import net.minecraft.world.gen.chunk.OverworldChunkGeneratorConfig;
import net.minecraft.world.gen.chunk.SurfaceChunkGenerator;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;

@Mixin(OverworldChunkGenerator.class)
public abstract class OverworldChunkGeneratorMixin extends SurfaceChunkGenerator<OverworldChunkGeneratorConfig>{
private OverworldChunkGeneratorMixin(IWorld world, BiomeSource biomeSource, int verticalNoiseResolution, int horizontalNoiseResolution, int worldHeight, OverworldChunkGeneratorConfig config, boolean useSimplexNoise){
super(world, biomeSource, verticalNoiseResolution, horizontalNoiseResolution, worldHeight, config, useSimplexNoise);
}

@ModifyConstant(
method = "<init>",
constant = @Constant(intValue = 256)
)
private static int init(int original){
return 512;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package net.gudenau.minecraft.tallworlds.mixin.gen;

import com.mojang.datafixers.Dynamic;
import java.util.function.Function;
import net.minecraft.world.gen.ProbabilityConfig;
import net.minecraft.world.gen.carver.Carver;
import net.minecraft.world.gen.carver.RavineCarver;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;

@Mixin(RavineCarver.class)
public abstract class RavineCarverMixin extends Carver<ProbabilityConfig>{
private RavineCarverMixin(Function<Dynamic<?>, ? extends ProbabilityConfig> configDeserializer, int heightLimit){
super(configDeserializer, heightLimit);
}

@ModifyConstant(
method = "<init>",
constant = @Constant(intValue = 256)
)
private static int init(int originalValue){
return 512;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package net.gudenau.minecraft.tallworlds.mixin.gen;

import com.mojang.datafixers.Dynamic;
import java.util.function.Function;
import net.minecraft.world.gen.ProbabilityConfig;
import net.minecraft.world.gen.carver.CaveCarver;
import net.minecraft.world.gen.carver.UnderwaterCaveCarver;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;

@Mixin(UnderwaterCaveCarver.class)
public abstract class UnderwaterCaveCarverMixin extends CaveCarver{
private UnderwaterCaveCarverMixin(Function<Dynamic<?>, ? extends ProbabilityConfig> configDeserializer, int heightLimit){
super(configDeserializer, heightLimit);
}

@ModifyConstant(
method = "<init>",
constant = @Constant(intValue = 256)
)
private static int init(int original){
return 512;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
package net.gudenau.minecraft.tallworlds.mixin.gen;

import com.mojang.datafixers.Dynamic;
import java.util.function.Function;
import net.minecraft.world.gen.feature.DefaultFeatureConfig;
import net.minecraft.world.gen.feature.Feature;
import net.minecraft.world.gen.feature.VinesFeature;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.injection.Constant;
import org.spongepowered.asm.mixin.injection.ModifyConstant;

@Mixin(VinesFeature.class)
public abstract class VinesFeatureMixin extends Feature<DefaultFeatureConfig>{
private VinesFeatureMixin(Function<Dynamic<?>, ? extends DefaultFeatureConfig> configDeserializer){
super(configDeserializer);
}

@ModifyConstant(
method = "generate",
constant = @Constant(intValue = 256)
)
private static int generate(int original){
return 512;
}
}
Loading

0 comments on commit cfd515c

Please sign in to comment.