Updated versions, and mappings.
This commit is contained in:
+5
-10
@@ -3,24 +3,19 @@ version=0.0.0-SNAPSHOT
|
|||||||
artifact_group=appeng
|
artifact_group=appeng
|
||||||
artifact_basename=appliedenergistics2-fabric
|
artifact_basename=appliedenergistics2-fabric
|
||||||
|
|
||||||
kotlin.code.style=official
|
|
||||||
org.gradle.jvmargs=-Xmx2G
|
org.gradle.jvmargs=-Xmx2G
|
||||||
|
|
||||||
# Fabric Properties
|
# Fabric Properties
|
||||||
# Check these on https://modmuss50.me/fabric.html
|
# Check these on https://modmuss50.me/fabric.html
|
||||||
|
|
||||||
minecraft_version=1.16.2
|
minecraft_version=1.16.3
|
||||||
yarn_mappings=1.16.2+build.6
|
yarn_mappings=1.16.3+build.11
|
||||||
loader_version=0.9.2+build.206
|
loader_version=0.9.3+build.207
|
||||||
|
|
||||||
#Fabric api
|
#Fabric api
|
||||||
fabric_version=0.20.1+build.401-1.16
|
fabric_version=0.21.0+build.407-1.16
|
||||||
|
|
||||||
loom_version=0.4-SNAPSHOT
|
loom_version=0.5-SNAPSHOT
|
||||||
|
|
||||||
# Kotlin
|
|
||||||
kotlin_version=1.3.61
|
|
||||||
fabric_kotlin_version=1.3.61+build.1
|
|
||||||
|
|
||||||
# Dependencies
|
# Dependencies
|
||||||
libblockattributes_version=0.8.0
|
libblockattributes_version=0.8.0
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ pluginManagement {
|
|||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id "fabric-loom" version loom_version
|
id "fabric-loom" version loom_version
|
||||||
id "org.jetbrains.kotlin.jvm" version kotlin_version
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ public class CableBusBlock extends AEBaseTileBlock<CableBusBlockEntity> implemen
|
|||||||
|
|
||||||
public CableBusBlock() {
|
public CableBusBlock() {
|
||||||
super(defaultProps(AEMaterials.GLASS).nonOpaque().dropsNothing().dynamicBounds()
|
super(defaultProps(AEMaterials.GLASS).nonOpaque().dropsNothing().dynamicBounds()
|
||||||
.lightLevel(state -> state.get(LIGHT_LEVEL)));
|
.luminance(state -> state.get(LIGHT_LEVEL)));
|
||||||
setDefaultState(getDefaultState().with(LIGHT_LEVEL, 0));
|
setDefaultState(getDefaultState().with(LIGHT_LEVEL, 0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,11 +38,11 @@ import appeng.helpers.Splotch;
|
|||||||
*/
|
*/
|
||||||
class PaintSplotchesBakedModel implements BakedModel, FabricBakedModel {
|
class PaintSplotchesBakedModel implements BakedModel, FabricBakedModel {
|
||||||
|
|
||||||
private static final SpriteIdentifier TEXTURE_PAINT1 = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX,
|
private static final SpriteIdentifier TEXTURE_PAINT1 = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE,
|
||||||
new Identifier(AppEng.MOD_ID, "block/paint1"));
|
new Identifier(AppEng.MOD_ID, "block/paint1"));
|
||||||
private static final SpriteIdentifier TEXTURE_PAINT2 = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX,
|
private static final SpriteIdentifier TEXTURE_PAINT2 = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE,
|
||||||
new Identifier(AppEng.MOD_ID, "block/paint2"));
|
new Identifier(AppEng.MOD_ID, "block/paint2"));
|
||||||
private static final SpriteIdentifier TEXTURE_PAINT3 = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX,
|
private static final SpriteIdentifier TEXTURE_PAINT3 = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE,
|
||||||
new Identifier(AppEng.MOD_ID, "block/paint3"));
|
new Identifier(AppEng.MOD_ID, "block/paint3"));
|
||||||
|
|
||||||
private final Sprite[] textures;
|
private final Sprite[] textures;
|
||||||
|
|||||||
@@ -36,18 +36,18 @@ import appeng.core.AppEng;
|
|||||||
|
|
||||||
class QnbFormedBakedModel implements BakedModel, FabricBakedModel {
|
class QnbFormedBakedModel implements BakedModel, FabricBakedModel {
|
||||||
|
|
||||||
private static final SpriteIdentifier TEXTURE_LINK = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX,
|
private static final SpriteIdentifier TEXTURE_LINK = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE,
|
||||||
new Identifier(AppEng.MOD_ID, "block/quantum_link"));
|
new Identifier(AppEng.MOD_ID, "block/quantum_link"));
|
||||||
private static final SpriteIdentifier TEXTURE_RING = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX,
|
private static final SpriteIdentifier TEXTURE_RING = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE,
|
||||||
new Identifier(AppEng.MOD_ID, "block/quantum_ring"));
|
new Identifier(AppEng.MOD_ID, "block/quantum_ring"));
|
||||||
private static final SpriteIdentifier TEXTURE_RING_LIGHT = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX,
|
private static final SpriteIdentifier TEXTURE_RING_LIGHT = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE,
|
||||||
new Identifier(AppEng.MOD_ID, "block/quantum_ring_light"));
|
new Identifier(AppEng.MOD_ID, "block/quantum_ring_light"));
|
||||||
private static final SpriteIdentifier TEXTURE_RING_LIGHT_CORNER = new SpriteIdentifier(
|
private static final SpriteIdentifier TEXTURE_RING_LIGHT_CORNER = new SpriteIdentifier(
|
||||||
SpriteAtlasTexture.BLOCK_ATLAS_TEX, new Identifier(AppEng.MOD_ID, "block/quantum_ring_light_corner"));
|
SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE, new Identifier(AppEng.MOD_ID, "block/quantum_ring_light_corner"));
|
||||||
private static final SpriteIdentifier TEXTURE_CABLE_GLASS = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX,
|
private static final SpriteIdentifier TEXTURE_CABLE_GLASS = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE,
|
||||||
new Identifier(AppEng.MOD_ID, "part/cable/glass/transparent"));
|
new Identifier(AppEng.MOD_ID, "part/cable/glass/transparent"));
|
||||||
private static final SpriteIdentifier TEXTURE_COVERED_CABLE = new SpriteIdentifier(
|
private static final SpriteIdentifier TEXTURE_COVERED_CABLE = new SpriteIdentifier(
|
||||||
SpriteAtlasTexture.BLOCK_ATLAS_TEX, new Identifier(AppEng.MOD_ID, "part/cable/covered/transparent"));
|
SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE, new Identifier(AppEng.MOD_ID, "part/cable/covered/transparent"));
|
||||||
|
|
||||||
private static final float DEFAULT_RENDER_MIN = 2.0f;
|
private static final float DEFAULT_RENDER_MIN = 2.0f;
|
||||||
private static final float DEFAULT_RENDER_MAX = 14.0f;
|
private static final float DEFAULT_RENDER_MAX = 14.0f;
|
||||||
|
|||||||
@@ -104,7 +104,7 @@ class CableBuilder {
|
|||||||
throw new IllegalStateException("Cable type " + cableType + " does not support connections.");
|
throw new IllegalStateException("Cable type " + cableType + " does not support connections.");
|
||||||
}
|
}
|
||||||
|
|
||||||
return new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX,
|
return new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE,
|
||||||
new Identifier(AppEng.MOD_ID, textureFolder + color.name().toLowerCase(Locale.ROOT)));
|
new Identifier(AppEng.MOD_ID, textureFolder + color.name().toLowerCase(Locale.ROOT)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ public enum CableCoreType {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public SpriteIdentifier getTexture(AEColor color) {
|
public SpriteIdentifier getTexture(AEColor color) {
|
||||||
return new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX,
|
return new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE,
|
||||||
new Identifier(AppEng.MOD_ID, this.textureFolder + "/" + color.name().toLowerCase(Locale.ROOT)));
|
new Identifier(AppEng.MOD_ID, this.textureFolder + "/" + color.name().toLowerCase(Locale.ROOT)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ import appeng.core.AppEng;
|
|||||||
|
|
||||||
public class P2PTunnelFrequencyModel implements BasicUnbakedModel {
|
public class P2PTunnelFrequencyModel implements BasicUnbakedModel {
|
||||||
|
|
||||||
private static final SpriteIdentifier TEXTURE = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX,
|
private static final SpriteIdentifier TEXTURE = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE,
|
||||||
new Identifier(AppEng.MOD_ID, "part/p2p_tunnel_frequency"));
|
new Identifier(AppEng.MOD_ID, "part/p2p_tunnel_frequency"));
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ public class SmartCableTextures {
|
|||||||
new Identifier(AppEng.MOD_ID, "part/cable/smart/channels_12"), //
|
new Identifier(AppEng.MOD_ID, "part/cable/smart/channels_12"), //
|
||||||
new Identifier(AppEng.MOD_ID, "part/cable/smart/channels_13"), //
|
new Identifier(AppEng.MOD_ID, "part/cable/smart/channels_13"), //
|
||||||
new Identifier(AppEng.MOD_ID, "part/cable/smart/channels_14")//
|
new Identifier(AppEng.MOD_ID, "part/cable/smart/channels_14")//
|
||||||
}).map(e -> new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX, e)).toArray(SpriteIdentifier[]::new);
|
}).map(e -> new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE, e)).toArray(SpriteIdentifier[]::new);
|
||||||
|
|
||||||
// Textures used to display channels on smart cables. There's two sets of 5
|
// Textures used to display channels on smart cables. There's two sets of 5
|
||||||
// textures each, and
|
// textures each, and
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ public class CraftingCubeModel implements BasicUnbakedModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static SpriteIdentifier texture(String name) {
|
private static SpriteIdentifier texture(String name) {
|
||||||
return new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX,
|
return new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE,
|
||||||
new Identifier(AppEng.MOD_ID, "block/crafting/" + name));
|
new Identifier(AppEng.MOD_ID, "block/crafting/" + name));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import appeng.core.AppEng;
|
|||||||
public class BiometricCardModel implements BasicUnbakedModel {
|
public class BiometricCardModel implements BasicUnbakedModel {
|
||||||
|
|
||||||
public static final Identifier MODEL_BASE = new Identifier(AppEng.MOD_ID, "item/biometric_card_base");
|
public static final Identifier MODEL_BASE = new Identifier(AppEng.MOD_ID, "item/biometric_card_base");
|
||||||
private static final SpriteIdentifier TEXTURE = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX,
|
private static final SpriteIdentifier TEXTURE = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE,
|
||||||
new Identifier(AppEng.MOD_ID, "item/biometric_card_hash"));
|
new Identifier(AppEng.MOD_ID, "item/biometric_card_hash"));
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -26,11 +26,11 @@ public class ColorApplicatorModel implements BasicUnbakedModel {
|
|||||||
|
|
||||||
private static final Identifier MODEL_BASE = new Identifier(AppEng.MOD_ID, "item/color_applicator_colored");
|
private static final Identifier MODEL_BASE = new Identifier(AppEng.MOD_ID, "item/color_applicator_colored");
|
||||||
|
|
||||||
private static final SpriteIdentifier TEXTURE_DARK = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX,
|
private static final SpriteIdentifier TEXTURE_DARK = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE,
|
||||||
new Identifier(AppEng.MOD_ID, "item/color_applicator_tip_dark"));
|
new Identifier(AppEng.MOD_ID, "item/color_applicator_tip_dark"));
|
||||||
private static final SpriteIdentifier TEXTURE_MEDIUM = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX,
|
private static final SpriteIdentifier TEXTURE_MEDIUM = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE,
|
||||||
new Identifier(AppEng.MOD_ID, "item/color_applicator_tip_medium"));
|
new Identifier(AppEng.MOD_ID, "item/color_applicator_tip_medium"));
|
||||||
private static final SpriteIdentifier TEXTURE_BRIGHT = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX,
|
private static final SpriteIdentifier TEXTURE_BRIGHT = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE,
|
||||||
new Identifier(AppEng.MOD_ID, "item/color_applicator_tip_bright"));
|
new Identifier(AppEng.MOD_ID, "item/color_applicator_tip_bright"));
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -62,13 +62,13 @@ class GlassBakedModel implements BakedModel, FabricBakedModel {
|
|||||||
private static final byte[][][] OFFSETS = generateOffsets();
|
private static final byte[][][] OFFSETS = generateOffsets();
|
||||||
|
|
||||||
// Alternating textures based on position
|
// Alternating textures based on position
|
||||||
static final SpriteIdentifier TEXTURE_A = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX,
|
static final SpriteIdentifier TEXTURE_A = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE,
|
||||||
new Identifier("appliedenergistics2:block/glass/quartz_glass_a"));
|
new Identifier("appliedenergistics2:block/glass/quartz_glass_a"));
|
||||||
static final SpriteIdentifier TEXTURE_B = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX,
|
static final SpriteIdentifier TEXTURE_B = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE,
|
||||||
new Identifier("appliedenergistics2:block/glass/quartz_glass_b"));
|
new Identifier("appliedenergistics2:block/glass/quartz_glass_b"));
|
||||||
static final SpriteIdentifier TEXTURE_C = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX,
|
static final SpriteIdentifier TEXTURE_C = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE,
|
||||||
new Identifier("appliedenergistics2:block/glass/quartz_glass_c"));
|
new Identifier("appliedenergistics2:block/glass/quartz_glass_c"));
|
||||||
static final SpriteIdentifier TEXTURE_D = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX,
|
static final SpriteIdentifier TEXTURE_D = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE,
|
||||||
new Identifier("appliedenergistics2:block/glass/quartz_glass_d"));
|
new Identifier("appliedenergistics2:block/glass/quartz_glass_d"));
|
||||||
|
|
||||||
// Frame texture
|
// Frame texture
|
||||||
@@ -81,7 +81,7 @@ class GlassBakedModel implements BakedModel, FabricBakedModel {
|
|||||||
private static SpriteIdentifier[] generateTexturesFrame() {
|
private static SpriteIdentifier[] generateTexturesFrame() {
|
||||||
return IntStream.range(1, 16).mapToObj(Integer::toBinaryString).map(s -> Strings.padStart(s, 4, '0'))
|
return IntStream.range(1, 16).mapToObj(Integer::toBinaryString).map(s -> Strings.padStart(s, 4, '0'))
|
||||||
.map(s -> new Identifier("appliedenergistics2:block/glass/quartz_glass_frame" + s))
|
.map(s -> new Identifier("appliedenergistics2:block/glass/quartz_glass_frame" + s))
|
||||||
.map(rl -> new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX, rl))
|
.map(rl -> new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE, rl))
|
||||||
.toArray(SpriteIdentifier[]::new);
|
.toArray(SpriteIdentifier[]::new);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ import appeng.core.AppEng;
|
|||||||
public class MemoryCardModel implements BasicUnbakedModel {
|
public class MemoryCardModel implements BasicUnbakedModel {
|
||||||
|
|
||||||
public static final Identifier MODEL_BASE = new Identifier(AppEng.MOD_ID, "item/memory_card_base");
|
public static final Identifier MODEL_BASE = new Identifier(AppEng.MOD_ID, "item/memory_card_base");
|
||||||
private static final SpriteIdentifier TEXTURE = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX,
|
private static final SpriteIdentifier TEXTURE = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE,
|
||||||
new Identifier(AppEng.MOD_ID, "item/memory_card_hash"));
|
new Identifier(AppEng.MOD_ID, "item/memory_card_hash"));
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ public class SpatialPylonModel implements BasicUnbakedModel {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static SpriteIdentifier getTexturePath(SpatialPylonTextureType type) {
|
private static SpriteIdentifier getTexturePath(SpatialPylonTextureType type) {
|
||||||
return new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX,
|
return new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE,
|
||||||
new Identifier(AppEng.MOD_ID, "block/spatial_pylon/" + type.name().toLowerCase(Locale.ROOT)));
|
new Identifier(AppEng.MOD_ID, "block/spatial_pylon/" + type.name().toLowerCase(Locale.ROOT)));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ public final class InscriberTESR extends BlockEntityRenderer<InscriberBlockEntit
|
|||||||
|
|
||||||
private static final float ITEM_RENDER_SCALE = 1.0f / 1.2f;
|
private static final float ITEM_RENDER_SCALE = 1.0f / 1.2f;
|
||||||
|
|
||||||
private static final SpriteIdentifier TEXTURE_INSIDE = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX,
|
private static final SpriteIdentifier TEXTURE_INSIDE = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE,
|
||||||
new Identifier(AppEng.MOD_ID, "block/inscriber_inside"));
|
new Identifier(AppEng.MOD_ID, "block/inscriber_inside"));
|
||||||
|
|
||||||
public static final ImmutableList<SpriteIdentifier> SPRITES = ImmutableList.of(TEXTURE_INSIDE);
|
public static final ImmutableList<SpriteIdentifier> SPRITES = ImmutableList.of(TEXTURE_INSIDE);
|
||||||
|
|||||||
@@ -74,6 +74,6 @@ public class TinyTNTPrimedRenderer extends EntityRenderer<TinyTNTPrimedEntity> {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Identifier getTexture(final TinyTNTPrimedEntity entity) {
|
public Identifier getTexture(final TinyTNTPrimedEntity entity) {
|
||||||
return SpriteAtlasTexture.BLOCK_ATLAS_TEX;
|
return SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,7 +111,7 @@ abstract class RecipeTransferHandler<T extends ScreenHandler & IContainerCraftin
|
|||||||
if (i < flatIngredients.size()) {
|
if (i < flatIngredients.size()) {
|
||||||
ItemStack displayedIngredient = first.getItemStack();
|
ItemStack displayedIngredient = first.getItemStack();
|
||||||
if (displayedIngredient != null) {
|
if (displayedIngredient != null) {
|
||||||
flatIngredients.set(i, Ingredient.method_26964(Stream.of(displayedIngredient)));
|
flatIngredients.set(i, Ingredient.ofStacks(Stream.of(displayedIngredient)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -47,6 +47,6 @@ public final class Tracer {
|
|||||||
BlockState blockState = world.getBlockState(pos);
|
BlockState blockState = world.getBlockState(pos);
|
||||||
|
|
||||||
LookDirection playerRay = Platform.getPlayerRay(player);
|
LookDirection playerRay = Platform.getPlayerRay(player);
|
||||||
return blockState.getCollisionShape(world, pos).rayTrace(playerRay.getA(), playerRay.getB(), pos);
|
return blockState.getCollisionShape(world, pos).raycast(playerRay.getA(), playerRay.getB(), pos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -54,7 +54,7 @@ import net.minecraft.util.hit.BlockHitResult;
|
|||||||
import net.minecraft.util.hit.HitResult;
|
import net.minecraft.util.hit.HitResult;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.Direction;
|
import net.minecraft.util.math.Direction;
|
||||||
import net.minecraft.world.RayTraceContext;
|
import net.minecraft.world.RaycastContext;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import appeng.api.config.Actionable;
|
import appeng.api.config.Actionable;
|
||||||
@@ -219,7 +219,7 @@ public class EntropyManipulatorItem extends AEBasePoweredItem implements IBlockT
|
|||||||
// considered for onItemUse
|
// considered for onItemUse
|
||||||
@Override
|
@Override
|
||||||
public TypedActionResult<ItemStack> use(final World w, final PlayerEntity p, final Hand hand) {
|
public TypedActionResult<ItemStack> use(final World w, final PlayerEntity p, final Hand hand) {
|
||||||
final BlockHitResult target = rayTrace(w, p, RayTraceContext.FluidHandling.ANY);
|
final BlockHitResult target = raycast(w, p, RaycastContext.FluidHandling.ANY);
|
||||||
|
|
||||||
if (target.getType() != HitResult.Type.BLOCK) {
|
if (target.getType() != HitResult.Type.BLOCK) {
|
||||||
BlockPos pos = target.getBlockPos();
|
BlockPos pos = target.getBlockPos();
|
||||||
|
|||||||
@@ -48,7 +48,7 @@ import net.minecraft.util.math.BlockPos;
|
|||||||
import net.minecraft.util.math.Box;
|
import net.minecraft.util.math.Box;
|
||||||
import net.minecraft.util.math.Direction;
|
import net.minecraft.util.math.Direction;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
import net.minecraft.world.RayTraceContext;
|
import net.minecraft.world.RaycastContext;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
import alexiil.mc.lib.attributes.item.FixedItemInv;
|
||||||
@@ -200,7 +200,7 @@ public class MatterCannonItem extends AEBasePoweredItem implements IStorageCell<
|
|||||||
final float f1 = 0.3F;
|
final float f1 = 0.3F;
|
||||||
|
|
||||||
final Box boundingBox = entity1.getBoundingBox().expand(f1, f1, f1);
|
final Box boundingBox = entity1.getBoundingBox().expand(f1, f1, f1);
|
||||||
final Vec3d intersection = boundingBox.rayTrace(Vec3d, Vec3d1).orElse(null);
|
final Vec3d intersection = boundingBox.raycast(Vec3d, Vec3d1).orElse(null);
|
||||||
|
|
||||||
if (intersection != null) {
|
if (intersection != null) {
|
||||||
final double nd = Vec3d.squaredDistanceTo(intersection);
|
final double nd = Vec3d.squaredDistanceTo(intersection);
|
||||||
@@ -214,9 +214,9 @@ public class MatterCannonItem extends AEBasePoweredItem implements IStorageCell<
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RayTraceContext rayTraceContext = new RayTraceContext(Vec3d, Vec3d1, RayTraceContext.ShapeType.COLLIDER,
|
RaycastContext rayTraceContext = new RaycastContext(Vec3d, Vec3d1, RaycastContext.ShapeType.COLLIDER,
|
||||||
RayTraceContext.FluidHandling.NONE, p);
|
RaycastContext.FluidHandling.NONE, p);
|
||||||
HitResult pos = w.rayTrace(rayTraceContext);
|
HitResult pos = w.raycast(rayTraceContext);
|
||||||
|
|
||||||
final Vec3d vec = new Vec3d(d0, d1, d2);
|
final Vec3d vec = new Vec3d(d0, d1, d2);
|
||||||
if (entity != null && pos.getType() != HitResult.Type.MISS && pos.getPos().squaredDistanceTo(vec) > closest) {
|
if (entity != null && pos.getType() != HitResult.Type.MISS && pos.getPos().squaredDistanceTo(vec) > closest) {
|
||||||
@@ -307,7 +307,7 @@ public class MatterCannonItem extends AEBasePoweredItem implements IStorageCell<
|
|||||||
final float f1 = 0.3F;
|
final float f1 = 0.3F;
|
||||||
|
|
||||||
final Box boundingBox = entity1.getBoundingBox().expand(f1, f1, f1);
|
final Box boundingBox = entity1.getBoundingBox().expand(f1, f1, f1);
|
||||||
final Vec3d intersection = boundingBox.rayTrace(Vec3d, Vec3d1).orElse(null);
|
final Vec3d intersection = boundingBox.raycast(Vec3d, Vec3d1).orElse(null);
|
||||||
|
|
||||||
if (intersection != null) {
|
if (intersection != null) {
|
||||||
final double nd = Vec3d.squaredDistanceTo(intersection);
|
final double nd = Vec3d.squaredDistanceTo(intersection);
|
||||||
@@ -322,10 +322,10 @@ public class MatterCannonItem extends AEBasePoweredItem implements IStorageCell<
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
RayTraceContext rayTraceContext = new RayTraceContext(Vec3d, Vec3d1, RayTraceContext.ShapeType.COLLIDER,
|
RaycastContext rayTraceContext = new RaycastContext(Vec3d, Vec3d1, RaycastContext.ShapeType.COLLIDER,
|
||||||
RayTraceContext.FluidHandling.NONE, p);
|
RaycastContext.FluidHandling.NONE, p);
|
||||||
final Vec3d vec = new Vec3d(d0, d1, d2);
|
final Vec3d vec = new Vec3d(d0, d1, d2);
|
||||||
HitResult pos = w.rayTrace(rayTraceContext);
|
HitResult pos = w.raycast(rayTraceContext);
|
||||||
if (entity != null && pos.getType() != HitResult.Type.MISS
|
if (entity != null && pos.getType() != HitResult.Type.MISS
|
||||||
&& pos.getPos().squaredDistanceTo(vec) > closest) {
|
&& pos.getPos().squaredDistanceTo(vec) > closest) {
|
||||||
pos = new EntityHitResult(entity, entityIntersection);
|
pos = new EntityHitResult(entity, entityIntersection);
|
||||||
|
|||||||
@@ -12,8 +12,7 @@ import org.spongepowered.asm.mixin.injection.callback.CallbackInfo;
|
|||||||
import net.minecraft.util.registry.BuiltinRegistries;
|
import net.minecraft.util.registry.BuiltinRegistries;
|
||||||
import net.minecraft.util.registry.RegistryKey;
|
import net.minecraft.util.registry.RegistryKey;
|
||||||
import net.minecraft.world.biome.Biome;
|
import net.minecraft.world.biome.Biome;
|
||||||
import net.minecraft.world.biome.Biomes;
|
import net.minecraft.world.biome.BiomeKeys;
|
||||||
|
|
||||||
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
|
||||||
|
|
||||||
import appeng.spatial.SpatialStorageBiome;
|
import appeng.spatial.SpatialStorageBiome;
|
||||||
@@ -23,7 +22,7 @@ import appeng.spatial.SpatialStorageDimensionIds;
|
|||||||
* This only needs to be here because the server-side will create a dynamic
|
* This only needs to be here because the server-side will create a dynamic
|
||||||
* registry manager long before our mod is initialized.
|
* registry manager long before our mod is initialized.
|
||||||
*/
|
*/
|
||||||
@Mixin(Biomes.class)
|
@Mixin(BiomeKeys.class)
|
||||||
public class BiomesMixin {
|
public class BiomesMixin {
|
||||||
|
|
||||||
@Unique
|
@Unique
|
||||||
|
|||||||
@@ -38,7 +38,7 @@ import net.minecraft.util.hit.HitResult;
|
|||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.Direction;
|
import net.minecraft.util.math.Direction;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
import net.minecraft.world.RayTraceContext;
|
import net.minecraft.world.RaycastContext;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import appeng.api.definitions.IBlockDefinition;
|
import appeng.api.definitions.IBlockDefinition;
|
||||||
@@ -76,9 +76,9 @@ public class PartPlacement {
|
|||||||
|
|
||||||
// FIXME: This was changed alot.
|
// FIXME: This was changed alot.
|
||||||
final LookDirection dir = Platform.getPlayerRay(player);
|
final LookDirection dir = Platform.getPlayerRay(player);
|
||||||
RayTraceContext rtc = new RayTraceContext(dir.getA(), dir.getB(), RayTraceContext.ShapeType.OUTLINE,
|
RaycastContext rtc = new RaycastContext(dir.getA(), dir.getB(), RaycastContext.ShapeType.OUTLINE,
|
||||||
RayTraceContext.FluidHandling.NONE, player);
|
RaycastContext.FluidHandling.NONE, player);
|
||||||
final BlockHitResult mop = world.rayTrace(rtc);
|
final BlockHitResult mop = world.raycast(rtc);
|
||||||
ItemPlacementContext useContext = new ItemPlacementContext(new ItemUsageContext(player, hand, mop));
|
ItemPlacementContext useContext = new ItemPlacementContext(new ItemUsageContext(player, hand, mop));
|
||||||
|
|
||||||
BlockEntity tile = world.getBlockEntity(pos);
|
BlockEntity tile = world.getBlockEntity(pos);
|
||||||
|
|||||||
@@ -392,12 +392,12 @@ public class FormationPlanePart extends AbstractFormationPlanePart<IAEItemStack>
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BlockPos getBlockPos() {
|
public BlockPos getBlockPos() {
|
||||||
return this.method_30344().getBlockPos();
|
return this.getHitResult().getBlockPos();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean canPlace() {
|
public boolean canPlace() {
|
||||||
return this.getWorld().getBlockState(this.method_30344().getBlockPos()).canReplace(this);
|
return this.getWorld().getBlockState(this.getHitResult().getBlockPos()).canReplace(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -43,9 +43,9 @@ public class PlaneModel implements BasicUnbakedModel {
|
|||||||
private final SpriteIdentifier backTexture;
|
private final SpriteIdentifier backTexture;
|
||||||
|
|
||||||
public PlaneModel(Identifier frontTexture, Identifier sidesTexture, Identifier backTexture) {
|
public PlaneModel(Identifier frontTexture, Identifier sidesTexture, Identifier backTexture) {
|
||||||
this.frontTexture = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX, frontTexture);
|
this.frontTexture = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE, frontTexture);
|
||||||
this.sidesTexture = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX, sidesTexture);
|
this.sidesTexture = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE, sidesTexture);
|
||||||
this.backTexture = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEX, backTexture);
|
this.backTexture = new SpriteIdentifier(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE, backTexture);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ public class SpatialStorageChunkGenerator extends ChunkGenerator {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static FixedBiomeSource createBiomeSource(Registry<Biome> biomeRegistry) {
|
private static FixedBiomeSource createBiomeSource(Registry<Biome> biomeRegistry) {
|
||||||
return new FixedBiomeSource(biomeRegistry.method_31140(SpatialStorageDimensionIds.BIOME_KEY));
|
return new FixedBiomeSource(biomeRegistry.getOrThrow(SpatialStorageDimensionIds.BIOME_KEY));
|
||||||
}
|
}
|
||||||
|
|
||||||
public Registry<Biome> getBiomeRegistry() {
|
public Registry<Biome> getBiomeRegistry() {
|
||||||
|
|||||||
@@ -145,7 +145,7 @@ public class MolecularAssemblerRenderer extends BlockEntityRenderer<MolecularAss
|
|||||||
* model from occluding our particles.
|
* model from occluding our particles.
|
||||||
*/
|
*/
|
||||||
private static RenderLayer createRenderType() {
|
private static RenderLayer createRenderType() {
|
||||||
RenderPhase.Texture mipmapBlockAtlasTexture = new RenderPhase.Texture(SpriteAtlasTexture.BLOCK_ATLAS_TEX, false,
|
RenderPhase.Texture mipmapBlockAtlasTexture = new RenderPhase.Texture(SpriteAtlasTexture.BLOCK_ATLAS_TEXTURE, false,
|
||||||
true);
|
true);
|
||||||
RenderPhase.Lightmap disableLightmap = new RenderPhase.Lightmap(false);
|
RenderPhase.Lightmap disableLightmap = new RenderPhase.Lightmap(false);
|
||||||
RenderLayer.MultiPhaseParameters glState = RenderLayer.MultiPhaseParameters.builder()
|
RenderLayer.MultiPhaseParameters glState = RenderLayer.MultiPhaseParameters.builder()
|
||||||
|
|||||||
@@ -80,7 +80,7 @@ public final class InscriberRecipes {
|
|||||||
name += " " + tag.getString(MaterialItem.TAG_INSCRIBE_NAME);
|
name += " " + tag.getString(MaterialItem.TAG_INSCRIBE_NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
final Ingredient startingItem = Ingredient.method_26964(Stream.of(input.copy()));
|
final Ingredient startingItem = Ingredient.ofStacks(Stream.of(input.copy()));
|
||||||
final ItemStack renamedItem = input.copy();
|
final ItemStack renamedItem = input.copy();
|
||||||
|
|
||||||
if (!name.isEmpty()) {
|
if (!name.isEmpty()) {
|
||||||
@@ -92,8 +92,8 @@ public final class InscriberRecipes {
|
|||||||
final InscriberProcessType type = InscriberProcessType.INSCRIBE;
|
final InscriberProcessType type = InscriberProcessType.INSCRIBE;
|
||||||
|
|
||||||
return new InscriberRecipe(NAMEPLATE_RECIPE_ID, "", startingItem, renamedItem,
|
return new InscriberRecipe(NAMEPLATE_RECIPE_ID, "", startingItem, renamedItem,
|
||||||
plateA.isEmpty() ? Ingredient.EMPTY : Ingredient.method_26964(Stream.of(plateA)),
|
plateA.isEmpty() ? Ingredient.EMPTY : Ingredient.ofStacks(Stream.of(plateA)),
|
||||||
plateB.isEmpty() ? Ingredient.EMPTY : Ingredient.method_26964(Stream.of(plateB)), type);
|
plateB.isEmpty() ? Ingredient.EMPTY : Ingredient.ofStacks(Stream.of(plateB)), type);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ import net.minecraft.util.math.Direction;
|
|||||||
import net.minecraft.util.math.MathHelper;
|
import net.minecraft.util.math.MathHelper;
|
||||||
import net.minecraft.util.math.Vec3d;
|
import net.minecraft.util.math.Vec3d;
|
||||||
import net.minecraft.util.registry.Registry;
|
import net.minecraft.util.registry.Registry;
|
||||||
import net.minecraft.world.RayTraceContext;
|
import net.minecraft.world.RaycastContext;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
|
|
||||||
import alexiil.mc.lib.attributes.fluid.volume.FluidVolume;
|
import alexiil.mc.lib.attributes.fluid.volume.FluidVolume;
|
||||||
@@ -715,7 +715,7 @@ public class Platform {
|
|||||||
f1 = 0.3F;
|
f1 = 0.3F;
|
||||||
// FIXME: Three different bounding boxes available, should double-check
|
// FIXME: Three different bounding boxes available, should double-check
|
||||||
final Box boundingBox = entity1.getBoundingBox().expand(f1, f1, f1);
|
final Box boundingBox = entity1.getBoundingBox().expand(f1, f1, f1);
|
||||||
final Vec3d rtResult = boundingBox.rayTrace(vec3, vec31).orElse(null);
|
final Vec3d rtResult = boundingBox.raycast(vec3, vec31).orElse(null);
|
||||||
|
|
||||||
if (rtResult != null) {
|
if (rtResult != null) {
|
||||||
final double nd = vec3.squaredDistanceTo(rtResult);
|
final double nd = vec3.squaredDistanceTo(rtResult);
|
||||||
@@ -735,8 +735,8 @@ public class Platform {
|
|||||||
if (hitBlocks) {
|
if (hitBlocks) {
|
||||||
vec = new Vec3d(d0, d1, d2);
|
vec = new Vec3d(d0, d1, d2);
|
||||||
// FIXME: passing p as entity here might be incorrect
|
// FIXME: passing p as entity here might be incorrect
|
||||||
pos = w.rayTrace(new RayTraceContext(vec3, vec31, RayTraceContext.ShapeType.COLLIDER,
|
pos = w.raycast(new RaycastContext(vec3, vec31, RaycastContext.ShapeType.COLLIDER,
|
||||||
RayTraceContext.FluidHandling.ANY, p));
|
RaycastContext.FluidHandling.ANY, p));
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity != null && pos != null && pos.getPos().squaredDistanceTo(vec) > closest) {
|
if (entity != null && pos != null && pos.getPos().squaredDistanceTo(vec) > closest) {
|
||||||
|
|||||||
Reference in New Issue
Block a user