• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

First Machine Age's Mods (Combined repo.)


Commit MetaInfo

修订版80fb75351f90f15dcd53fa93741e05669556f420 (tree)
时间2021-04-04 05:44:45
作者melchior <melchior@user...>
Commitermelchior

Log Message

W.I.P.: fixed wall model rotations and bounding...more

更改概述

差异

--- a/Assorted/Assorted.csproj
+++ b/Assorted/Assorted.csproj
@@ -161,7 +161,6 @@
161161 <CopyToOutputDirectory>Always</CopyToOutputDirectory>
162162 </None>
163163 <None Include="assets\defensive\blocktypes\metal\brazier.json">
164- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
165164 </None>
166165 <None Include="assets\defensive\shapes\block\stone\brick_w_candle.json">
167166 <CopyToOutputDirectory>Always</CopyToOutputDirectory>
@@ -170,7 +169,6 @@
170169 <CopyToOutputDirectory>Always</CopyToOutputDirectory>
171170 </None>
172171 <None Include="assets\defensive\blocktypes\stone\sconse_brick.json">
173- <CopyToOutputDirectory>Always</CopyToOutputDirectory>
174172 </None>
175173 <None Include="assets\defensive\shapes\block\wood\false_floor.json">
176174 <CopyToOutputDirectory>Always</CopyToOutputDirectory>
--- a/Assorted/BlockBehaviors/BlockBehaviorNeedSides.cs
+++ b/Assorted/BlockBehaviors/BlockBehaviorNeedSides.cs
@@ -62,7 +62,7 @@ namespace FirstMachineAge
6262 }
6363 else
6464 {
65- failureCode = @"requirehorizontalattachable";
65+ failureCode = @"requirehorizontalside";
6666 }
6767
6868 return true;
--- a/Assorted/BlockClasses/CollapsingBlock.cs
+++ b/Assorted/BlockClasses/CollapsingBlock.cs
@@ -48,9 +48,7 @@ namespace FirstMachineAge
4848 }
4949
5050 if (enough) {
51- localAcc.BlockAccessor.BreakBlock(here.Copy(), null);
52- //TODO: Sound & Dust
53-
51+ localAcc.BlockAccessor.BreakBlock(here.Copy(), null);
5452 }
5553
5654 }
@@ -98,7 +96,7 @@ namespace FirstMachineAge
9896 #endif
9997
10098 //Tick Callback; in 200ms...
101- ServerAPI.World.RegisterCallbackUnique(MabeyCollapse, pos.Copy() ,50);
99+ ServerAPI.World.RegisterCallback(MabeyCollapse, pos.Copy() ,50);
102100 }
103101
104102 public override void OnEntityInside(IWorldAccessor world, Entity entity, BlockPos pos)
@@ -111,7 +109,7 @@ namespace FirstMachineAge
111109 #endif
112110
113111 //Tick Callback; in 200ms...
114- ServerAPI.World.RegisterCallbackUnique(MabeyCollapse, pos.Copy( ), 50);
112+ ServerAPI.World.RegisterCallback(MabeyCollapse, pos.Copy( ), 50);
115113 }
116114
117115 public override string GetPlacedBlockName(IWorldAccessor world, BlockPos pos)
@@ -140,29 +138,31 @@ namespace FirstMachineAge
140138 return false;
141139 }
142140
143- public override void OnBlockBroken(IWorldAccessor world, BlockPos pos, IPlayer byPlayer, float dropQuantityMultiplier = 1)
141+ public override void OnBlockRemoved(IWorldAccessor world, BlockPos pos)
144142 {
145143 if (api.Side.IsClient( )) {
144+ var capi = api as ICoreClientAPI;
146145 //Bits of broken block
147146
148- var particleProps = new SimpleParticleProperties(1, 3, this.GetRandomColor(api as ICoreClientAPI, pos.Copy( ), BlockFacing.UP), new Vec3d( ), new Vec3d( ), new Vec3f(-0.25f, -0.25f, -0.25f), new Vec3f(0.25f, 0.25f, 0.25f), 1, 1, 0.1f, 0.3f, EnumParticleModel.Quad);
149- particleProps.AddPos.Set(1.4, 1.4, 1.4);
150- particleProps.AddQuantity = 20;
151- particleProps.MinVelocity.Set(-0.25f, 0, -0.25f);
152- particleProps.AddVelocity.Set(0.5f, 1, 0.5f);
147+ var particleProps = new SimpleParticleProperties(9, 12, this.GetRandomColor(api as ICoreClientAPI, pos.Copy( ), BlockFacing.UP), pos.ToVec3d( ),pos.ToVec3d( ), Vec3f.Zero, Vec3f.Zero);
148+
149+ particleProps.MinQuantity = 9;
150+ particleProps.MinVelocity.Set(-0.05f, 0, -0.05f);
151+ particleProps.AddVelocity.Set(0.5f, 0, 0.5f);
153152 particleProps.WithTerrainCollision = true;
154153 particleProps.ParticleModel = EnumParticleModel.Cube;
155- particleProps.LifeLength = 1.5f;
156- particleProps.SizeEvolve = EvolvingNatFloat.create(EnumTransformFunction.QUADRATIC, -0.5f);
154+ particleProps.LifeLength = 1.5f;
157155 particleProps.GravityEffect = 2.5f;
158- particleProps.MinSize = 0.5f;
159- particleProps.MaxSize = 1.5f;
156+ particleProps.MinSize = 0.75f;
157+ particleProps.MaxSize = 1.0f;
158+ particleProps.WithTerrainCollision = true;
159+
160+ capi.World.SpawnParticles(particleProps);
161+ //TODO: Sound
160162
161- byPlayer.Entity.World.SpawnParticles(particleProps, byPlayer);
162-
163163 }
164164
165- base.OnBlockBroken(world, pos, byPlayer, dropQuantityMultiplier);
165+ base.OnBlockRemoved(world, pos);
166166 }
167167
168168 #endregion
--- a/Assorted/assets/defensive/blocktypes/ceramic/enclosed_candle.json
+++ b/Assorted/assets/defensive/blocktypes/ceramic/enclosed_candle.json
@@ -1,9 +1,9 @@
11 {
22 code: "enclosed_candle",
33 storageFlags: 1,
4- behaviors: [{name: "HorizontalOrientable"}],
4+ behaviors: [{name: "HorizontalAttachable", properties: { dropBlockFace: "north" }}],
55 variantgroups: [
6- { code:"wall", loadFromProperties: "abstract/horizontalorientation" }
6+ { code:"side", loadFromProperties: "abstract/horizontalorientation" }
77 ],
88 collisionbox: null,
99 renderpass: "OpaqueNoCull",
--- a/Assorted/assets/defensive/blocktypes/stone/false_wall.json
+++ b/Assorted/assets/defensive/blocktypes/stone/false_wall.json
@@ -26,24 +26,24 @@
2626 shapeinventory: { base: "block/stone/false_wall_inv" },
2727 shapebytype: {
2828 "*-north-down-closed-*": { base: "block/stone/false_wall_lower", rotateY: 0 },
29- "*-north-up-closed-*": { base: "block/stone/false_wall_upper", rotateY: 0 },
30- "*-north-down-opened-*": { base: "block/stone/false_wall_lower" , rotateY: -90, offsetX: -0.80 },
31- "*-north-up-opened-*": { base: "block/stone/false_wall_upper", rotateY: -90, offsetX: -0.80 },
29+ "*-north-up-closed-*": { base: "block/stone/false_wall_upper", rotateY: 0 },
30+ "*-north-down-opened-*": { base: "block/stone/false_wall_lower" ,rotateY: -90, offsetX: -0.80 },
31+ "*-north-up-opened-*": { base: "block/stone/false_wall_upper", rotateY: -90, offsetX: -0.80 },
3232
33- "*-east-down-closed-*": { base:"block/stone/false_wall_lower", rotateY: 90 },
34- "*-east-up-closed-*": { base: "block/stone/false_wall_upper", rotateY: 90 },
35- "*-east-down-opened-*": { base: "block/stone/false_wall_lower", rotateY: 180, offsetX: -0.20 },
36- "*-east-up-opened-*": { base: "block/stone/false_wall_upper", rotateY: 180, offsetX: -0.20 },
33+ "*-east-down-closed-*": { base:"block/stone/false_wall_lower", rotateY: 90 },
34+ "*-east-up-closed-*": { base: "block/stone/false_wall_upper", rotateY: 90 },
35+ "*-east-down-opened-*": { base: "block/stone/false_wall_lower", rotateY: 0, offsetZ: 0.80 },
36+ "*-east-up-opened-*": { base: "block/stone/false_wall_upper", rotateY: 0, offsetZ: 0.80 },
3737
3838 "*-south-down-closed-*": { base: "block/stone/false_wall_lower", rotateY: 180 },
39- "*-south-up-closed-*": { base: "block/stone/false_wall_upper", rotateY:180 },
40- "*-south-down-opened-*": { base: "block/stone/false_wall_lower", rotateY: 270, offsetX: -0.80 },
41- "*-south-up-opened-*": { base: "block/stone/false_wall_upper", rotateY: 270, offsetX: -0.80 },
39+ "*-south-up-closed-*": { base: "block/stone/false_wall_upper", rotateY:180 },
40+ "*-south-down-opened-*": { base: "block/stone/false_wall_lower", rotateY: 90, offsetX: 0.80 },
41+ "*-south-up-opened-*": { base: "block/stone/false_wall_upper", rotateY: 90, offsetX: 0.80 },
4242
43- "*-west-down-closed-*": { base: "block/stone/false_wall_lower", rotateY: 270 },
44- "*-west-up-closed-*": { base: "block/stone/false_wall_upper", rotateY: 270 },
45- "*-west-down-opened-*": { base: "block/stone/false_wall_lower", rotateY: 0, offsetX: -0.20 },
46- "*-west-up-opened-*": { base: "block/stone/false_wall_upper", rotateY: 0, offsetX: -0.20 },
43+ "*-west-down-closed-*": { base: "block/stone/false_wall_lower", rotateY: 270 },
44+ "*-west-up-closed-*": { base: "block/stone/false_wall_upper", rotateY: 270 },
45+ "*-west-down-opened-*": { base: "block/stone/false_wall_lower", rotateY: 180, offsetZ: -0.80 },
46+ "*-west-up-opened-*": { base: "block/stone/false_wall_upper", rotateY: 180, offsetZ: -0.80 },
4747 },
4848 blockmaterial: "Stone",
4949 replaceable: 500,
@@ -107,14 +107,14 @@
107107 },
108108 collisionbox: { x1: 0, y1: 0, z1: 0, x2: 1, y2: 1, z2: 0.25,
109109 rotateYByType: {
110- "*-north-*-opened-*": 90,
111- "*-north-*-closed-*": 0,
112- "*-west-*-opened-*": -180,
113- "*-west-*-closed-*": -90,
114- "*-east-*-opened-*": 180,
115- "*-east-*-closed-*": 90,
116- "*-south-*-opened-*": -90,
117- "*-south-*-closed-*": 90,
110+ "*-north-*-opened-*": 90,
111+ "*-south-*-opened-*": 270,
112+ "*-east-*-opened-*": 180,
113+ "*-west-*-opened-*": 0,
114+ "*-north-*-closed-*": 0,
115+ "*-south-*-closed-*": 180,
116+ "*-east-*-closed-*": 90,
117+ "*-west-*-closed-*": -90,
118118 }
119119 },
120120 sounds: {
--- a/Assorted/assets/defensive/lang/en.json
+++ b/Assorted/assets/defensive/lang/en.json
@@ -12,4 +12,5 @@
1212 "defensive:bolted_shut": "<font color='red'>Bolted Shut!</font>",
1313 "defensive:bolted_open": "Its Open.",
1414 "defensive:block-enclosed_candle-*":"Enclosed candle holder",
15+ "defensive:placefailure-requirehorizontalside": "Cannot place block here! It needs one solid sided block adjacent.",
1516 }
\ No newline at end of file
--- a/Assorted/assets/defensive/recipes/smithing/grille_h.json
+++ b/Assorted/assets/defensive/recipes/smithing/grille_h.json
@@ -11,6 +11,6 @@
1111 "_#___#___#_",
1212 "_#___#___#_",
1313 ]],
14- name: "Lattice Iron Grille",
14+ name: "Lattice Iron Grille H",
1515 output: { type: "block", code: "defensive:grille_horizontal-north", stacksize: 3 }
1616 }
\ No newline at end of file
--- a/Assorted/assets/defensive/recipes/smithing/grille_v.json
+++ b/Assorted/assets/defensive/recipes/smithing/grille_v.json
@@ -11,6 +11,6 @@
1111 "_#_______#_",
1212 "_#_______#_",
1313 ]],
14- name: "Lattice Iron Grille",
15- output: { type: "block", code: "defensive:grille_vertical-north", stacksize: 3 }
14+ name: "Lattice Iron Grille V",
15+ output: { type: "block", code: "defensive:grille_vertical-down", stacksize: 3 }
1616 }
\ No newline at end of file