Upload from upload_mods.ps1
This commit is contained in:
49
Scripts/Requirements/CannotShapeCopyRotate.cs
Normal file
49
Scripts/Requirements/CannotShapeCopyRotate.cs
Normal file
@@ -0,0 +1,49 @@
|
||||
public class CannotShapeCopyRotate : TargetedCompareRequirementBase
|
||||
{
|
||||
|
||||
public override bool IsValid(MinEventParams _params)
|
||||
{
|
||||
//Log.Out("CannotShapeCopyRotate-IsValid START");
|
||||
if (!base.IsValid(_params))
|
||||
{
|
||||
//Log.Out("CannotShapeCopyRotate-IsValid INVALID");
|
||||
return false;
|
||||
}
|
||||
EntityAlive me = _params.Self;
|
||||
|
||||
bool flag = true;
|
||||
|
||||
if (_params.Self.inventory.holdingItemItemValue.ItemClass is ItemClassBlock && _params.Self.inventory.holdingItemItemValue.ItemClass.GetItemName().ToLower().Contains("shapes:"))
|
||||
{
|
||||
//Log.Out("CannotShapeCopyRotate-IsValid CAN COPY AND ROTATE");
|
||||
/*if (_params.Self is EntityPlayerLocal player)
|
||||
{
|
||||
BlockValue blockValue = player.HitInfo.hit.blockValue;
|
||||
|
||||
if (blockValue.ischild)
|
||||
{
|
||||
blockValue = player.world.GetBlock(blockValue.Block.multiBlockPos.GetParentPos(player.HitInfo.hit.blockPos, blockValue));
|
||||
}
|
||||
|
||||
if (blockValue.Block.shape != null)
|
||||
{
|
||||
flag = false;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
flag = false;
|
||||
}*/
|
||||
flag = false;
|
||||
}
|
||||
|
||||
//Log.Out("CannotShapeCopyRotate-IsValid false: " + false);
|
||||
|
||||
if (!this.invert)
|
||||
{
|
||||
return flag;
|
||||
}
|
||||
return !flag;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user