mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2024-12-14 12:10:30 +00:00
Initial update to 1.16.2
Seems to load fine, but not done any proper testing.
This commit is contained in:
parent
29646a7f61
commit
99581e1f40
@ -2,6 +2,6 @@
|
|||||||
mod_version=1.90.3
|
mod_version=1.90.3
|
||||||
|
|
||||||
# Minecraft properties (update mods.toml when changing)
|
# Minecraft properties (update mods.toml when changing)
|
||||||
mc_version=1.16.1
|
mc_version=1.16.2
|
||||||
forge_version=32.0.75
|
forge_version=33.0.3
|
||||||
mappings_version=20200723-1.16.1
|
mappings_version=20200723-1.16.1
|
||||||
|
@ -25,6 +25,7 @@ import net.minecraft.util.Direction;
|
|||||||
import net.minecraft.util.ResourceLocation;
|
import net.minecraft.util.ResourceLocation;
|
||||||
import net.minecraft.util.math.BlockPos;
|
import net.minecraft.util.math.BlockPos;
|
||||||
import net.minecraft.util.math.RayTraceResult;
|
import net.minecraft.util.math.RayTraceResult;
|
||||||
|
import net.minecraft.util.math.vector.Vector3d;
|
||||||
import net.minecraft.world.IBlockReader;
|
import net.minecraft.world.IBlockReader;
|
||||||
import net.minecraft.world.World;
|
import net.minecraft.world.World;
|
||||||
import net.minecraft.world.server.ServerWorld;
|
import net.minecraft.world.server.ServerWorld;
|
||||||
@ -138,6 +139,7 @@ public abstract class BlockComputerBase<T extends TileComputerBase> extends Bloc
|
|||||||
public void onBlockHarvested( @Nonnull World world, @Nonnull BlockPos pos, @Nonnull BlockState state, @Nonnull PlayerEntity player )
|
public void onBlockHarvested( @Nonnull World world, @Nonnull BlockPos pos, @Nonnull BlockState state, @Nonnull PlayerEntity player )
|
||||||
{
|
{
|
||||||
if( !(world instanceof ServerWorld) ) return;
|
if( !(world instanceof ServerWorld) ) return;
|
||||||
|
ServerWorld serverWorld = (ServerWorld) world;
|
||||||
|
|
||||||
// We drop the item here instead of doing it in the harvest method, as we should
|
// We drop the item here instead of doing it in the harvest method, as we should
|
||||||
// drop computers for creative players too.
|
// drop computers for creative players too.
|
||||||
@ -146,19 +148,19 @@ public abstract class BlockComputerBase<T extends TileComputerBase> extends Bloc
|
|||||||
if( tile instanceof TileComputerBase )
|
if( tile instanceof TileComputerBase )
|
||||||
{
|
{
|
||||||
TileComputerBase computer = (TileComputerBase) tile;
|
TileComputerBase computer = (TileComputerBase) tile;
|
||||||
LootContext.Builder context = new LootContext.Builder( (ServerWorld) world )
|
LootContext.Builder context = new LootContext.Builder( serverWorld )
|
||||||
.withRandom( world.rand )
|
.withRandom( world.rand )
|
||||||
.withParameter( LootParameters.POSITION, pos )
|
.withParameter( LootParameters.field_237457_g_, Vector3d.copyCentered( pos ) )
|
||||||
.withParameter( LootParameters.TOOL, player.getHeldItemMainhand() )
|
.withParameter( LootParameters.TOOL, player.getHeldItemMainhand() )
|
||||||
.withParameter( LootParameters.THIS_ENTITY, player )
|
.withParameter( LootParameters.THIS_ENTITY, player )
|
||||||
.withNullableParameter( LootParameters.BLOCK_ENTITY, tile )
|
.withParameter( LootParameters.BLOCK_ENTITY, tile )
|
||||||
.withDynamicDrop( DROP, ( ctx, out ) -> out.accept( getItem( computer ) ) );
|
.withDynamicDrop( DROP, ( ctx, out ) -> out.accept( getItem( computer ) ) );
|
||||||
for( ItemStack item : state.getDrops( context ) )
|
for( ItemStack item : state.getDrops( context ) )
|
||||||
{
|
{
|
||||||
spawnAsEntity( world, pos, item );
|
spawnAsEntity( world, pos, item );
|
||||||
}
|
}
|
||||||
|
|
||||||
state.spawnAdditionalDrops( world, pos, player.getHeldItemMainhand() );
|
state.spawnAdditionalDrops( serverWorld, pos, player.getHeldItemMainhand() );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -207,9 +207,7 @@ public class BlockCable extends BlockGeneric implements IWaterLoggable
|
|||||||
Direction facing = state.get( MODEM ).getFacing();
|
Direction facing = state.get( MODEM ).getFacing();
|
||||||
if( facing == null ) return true;
|
if( facing == null ) return true;
|
||||||
|
|
||||||
BlockPos offsetPos = pos.offset( facing );
|
return hasEnoughSolidSide( world, pos.offset( facing ), facing.getOpposite() );
|
||||||
BlockState offsetState = world.getBlockState( offsetPos );
|
|
||||||
return hasSolidSide( offsetState, world, offsetPos, facing.getOpposite() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
@ -80,12 +80,10 @@ public class BlockWirelessModem extends BlockGeneric implements IWaterLoggable
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public boolean isValidPosition( BlockState state, IWorldReader world, BlockPos pos )
|
public boolean isValidPosition( BlockState state, @Nonnull IWorldReader world, BlockPos pos )
|
||||||
{
|
{
|
||||||
Direction facing = state.get( FACING );
|
Direction facing = state.get( FACING );
|
||||||
BlockPos offsetPos = pos.offset( facing );
|
return hasEnoughSolidSide( world, pos.offset( facing ), facing.getOpposite() );
|
||||||
BlockState offsetState = world.getBlockState( offsetPos );
|
|
||||||
return hasSolidSide( offsetState, world, offsetPos, facing.getOpposite() );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Nullable
|
@Nullable
|
||||||
|
@ -65,11 +65,6 @@ public class FakeNetHandler extends ServerPlayNetHandler
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void handleRecipeBookUpdate( @Nonnull CRecipeInfoPacket packet )
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void handleSeenAdvancements( @Nonnull CSeenAdvancementsPacket packet )
|
public void handleSeenAdvancements( @Nonnull CSeenAdvancementsPacket packet )
|
||||||
{
|
{
|
||||||
|
@ -2,3 +2,6 @@
|
|||||||
public net.minecraft.client.renderer.FirstPersonRenderer func_178100_c(F)F # getMapAngleFromPitch
|
public net.minecraft.client.renderer.FirstPersonRenderer func_178100_c(F)F # getMapAngleFromPitch
|
||||||
public net.minecraft.client.renderer.FirstPersonRenderer func_228401_a_(Lcom/mojang/blaze3d/matrix/MatrixStack;Lnet/minecraft/client/renderer/IRenderTypeBuffer;IFFLnet/minecraft/util/HandSide;)V # renderArmFirstPerson
|
public net.minecraft.client.renderer.FirstPersonRenderer func_228401_a_(Lcom/mojang/blaze3d/matrix/MatrixStack;Lnet/minecraft/client/renderer/IRenderTypeBuffer;IFFLnet/minecraft/util/HandSide;)V # renderArmFirstPerson
|
||||||
public net.minecraft.client.renderer.FirstPersonRenderer func_228403_a_(Lcom/mojang/blaze3d/matrix/MatrixStack;Lnet/minecraft/client/renderer/IRenderTypeBuffer;ILnet/minecraft/util/HandSide;)V # renderArm
|
public net.minecraft.client.renderer.FirstPersonRenderer func_228403_a_(Lcom/mojang/blaze3d/matrix/MatrixStack;Lnet/minecraft/client/renderer/IRenderTypeBuffer;ILnet/minecraft/util/HandSide;)V # renderArm
|
||||||
|
# ClientTableFormatter
|
||||||
|
public net.minecraft.client.gui.NewChatGui func_146234_a(Lnet/minecraft/util/text/ITextComponent;I)V # printChatMessageWithOptionalDeletion
|
||||||
|
public net.minecraft.client.gui.NewChatGui func_146242_c(I)V # deleteChatLine
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
modLoader="javafml"
|
modLoader="javafml"
|
||||||
loaderVersion="[32,33)"
|
loaderVersion="[33,34)"
|
||||||
|
|
||||||
issueTrackerURL="https://github.com/SquidDev-CC/CC-Tweaked/issues"
|
issueTrackerURL="https://github.com/SquidDev-CC/CC-Tweaked/issues"
|
||||||
displayURL="https://github.com/SquidDev-CC/CC-Tweaked"
|
displayURL="https://github.com/SquidDev-CC/CC-Tweaked"
|
||||||
@ -7,6 +7,7 @@ logoFile="pack.png"
|
|||||||
|
|
||||||
credits="Created by Daniel Ratcliffe (@DanTwoHundred)"
|
credits="Created by Daniel Ratcliffe (@DanTwoHundred)"
|
||||||
authors="Daniel Ratcliffe, Aaron Mills, SquidDev"
|
authors="Daniel Ratcliffe, Aaron Mills, SquidDev"
|
||||||
|
license="ComputerCraft Public License (https://raw.githubusercontent.com/dan200/ComputerCraft/master/LICENSE)"
|
||||||
|
|
||||||
[[mods]]
|
[[mods]]
|
||||||
modId="computercraft"
|
modId="computercraft"
|
||||||
@ -19,6 +20,6 @@ CC: Tweaked is a fork of ComputerCraft, adding programmable computers, turtles a
|
|||||||
[[dependencies.computercraft]]
|
[[dependencies.computercraft]]
|
||||||
modId="forge"
|
modId="forge"
|
||||||
mandatory=true
|
mandatory=true
|
||||||
versionRange="[32.0.69,33)"
|
versionRange="[33.0.3,34)"
|
||||||
ordering="NONE"
|
ordering="NONE"
|
||||||
side="BOTH"
|
side="BOTH"
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"pack": {
|
"pack": {
|
||||||
"pack_format": 4,
|
"pack_format": 6,
|
||||||
"description": "CC: Tweaked"
|
"description": "CC: Tweaked"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user